错误files list file for package 'xxx' missing; assuming package has no files currently installed的解决方法

apt-get install或apt-get purge时报错“files list file for package 'xxx' missing; assuming package has no files currently installed”,其中xxx是具体的包名。

方法1:
sudo apt-get update
sudo apt-get install --reinstall xxx

方法2:
vim fix.sh

输入以下shell脚本:

#!/bin/bash
set -e# Clean out /var/cache/apt/archives
apt-get clean
# Fill it with all the .debs we need
apt-get --reinstall -dy install $(dpkg --get-selections | grep '[[:space:]]install' | cut -f1)DIR=$(mktemp -d -t info-XXXXXX)
for deb in /var/cache/apt/archives/*.deb
do# Move to working directorycd "$DIR"# Create DEBIAN directorymkdir -p DEBIAN# Extract control filesdpkg-deb -e "$deb"# Extract file list, fixing up the leading ./ and turning / into /.dpkg-deb -c "$deb" | awk '{print $NF}' | cut -c2- | sed -e 's/^\/$/\/./' > DEBIAN/list# Figure out binary package nameDEB=$(basename "$deb" | cut -d_ -f1)# Copy each control file into placecd DEBIANfor file in *docp -a "$file" /var/lib/dpkg/info/"$DEB"."$file"done# Clean upcd ..rm -rf DEBIAN
done
rmdir "$DIR"

运行sh fix.sh

files list file for package ‘xxx‘ missing相关推荐

  1. RLException: XXX is neither a launch file in package XXX nor is XXX a launch file name问题解决

    RLException: XXX is neither a launch file in package XXX nor is XXX a launch file name问题解决 参考文章: (1) ...

  2. 【linux】dpkg info修复及dpkg: warning: files list file for package

    mv /var/lib/dpkg/info /var/lib/dpkg/info.bak //现将info文件夹更名 sudo mkdir /var/lib/dpkg/info //再新建一个新的in ...

  3. rpm提示:XXX conflicts with file form package XXX

    最近为兼容云计算厂家提供的虚拟机备份恢复业务场景,甲方提供内部库以及相应demo作为引子,一个rpm包,一个引发血案的rpm包.包的样子就是一个普通的rpm包,平平无奇.而这个平平无奇的rpm包中依赖 ...

  4. The project description file (.project) for 'xxx' is missing.

    正常打开工作空间之后发现项目关闭了,然后要打开它就报错 The project description file (.project) for 'xxx' is missing. This file ...

  5. mysql错误:file xxx conflicts with file from package mysql-libs-5.5.68-1.el7.x86_64

    错误 shell> yum install -y mysql-community-common-5.7.31-1.el7.x86_64.rpm 发生错误: file /usr/share/mys ...

  6. Error opening zip file or JAR manifest missing的解决方法

    错误描述: MyEclipse中启动Tomcat(debug)的时候就出现Error starting Tomcat : A configuration error occured during st ...

  7. [转]Could not load file or assembly 'XXX' or one of its dependencies.

    今天我在用VS2010的时候,突然蓝屏,然后一个WEB程序执行就会报怪异的问题:Could not load file or assembly 'XXX' or one of its dependen ...

  8. go语言导入自定义包出现: package xxx is not in GOROOT (/xxx/xxx) 的解决方案

    go语言导入自定义包出现: package xxx is not in GOROOT (/xxx/xxx) 的解决方案 1.问题 写了个自定义的包 calc.go,在路径 $GOPATH/projec ...

  9. Parsing error: No Babel config file detected for xxx Either disable config file checking...报错解决方法

    Parsing error: No Babel config file detected for xxx Either disable config file checking-报错解决方法 使用Vu ...

最新文章

  1. IOS数据存储 —— 1 沙盒(数据存储目录)
  2. NGUI_2.6.3_系列教程六(序列帧动画)
  3. *与**在python中的使用
  4. Android Studio类中实现Serializable自动生成serialVersionUID
  5. jQuery调用或获取iframe中的方法或控件值
  6. Ubuntu下yolov4训练自己的数据集
  7. matlab软件进行仿真验证,matlab仿真软件
  8. 上完选修计算机绘图课心得,【高师院校化工制图课教学中存在的问题与对策】 一周化工制图实训课的心得体会...
  9. layui树形美化_使用layui-tree美化左侧菜单,点击生成tab选项
  10. 新知实验室-基于腾讯云音视频TRTC的微信小程序实践
  11. [中文语音识别后文本加标点] 维基百科数据下载和解析(xml-txt)
  12. linux误删文件恢复的方法 ----debugfs
  13. 2022最新阿里P6+Java技术体系图
  14. 苹果手机导出照片到电脑上
  15. 学习Python的心得体会——阜阳师范大学 21级大数据管理与应用1班的同学不要抄哦
  16. 简单的语音合成与语音识别(科大讯飞)
  17. springboot引入国际化
  18. MixamoConverter教程
  19. 白雪公主和她的七个供应商
  20. Beef的安装及基本使用

热门文章

  1. RESTful风格的应用
  2. PRD的编写要点详解
  3. 如何洞悉人性、洞察人心
  4. 什么是电脑监控软件?
  5. Excel插入地图进行可视化
  6. LocalDateTime的JSON序列化和反序列化
  7. java企业面试填空题_Java企业面试题填空题及答案
  8. Python方括号、花括号和圆括号的用法总结
  9. 电商败给了直播带货,实体店能靠直播提升销量吗?
  10. 又被人骗了,真是郁闷!