求助! apt-get 安装任何包都报错
Tofloor
poster avatar
流水的行云
deepin
2017-03-13 22:10
Author
前段时间不知道安装什么包,会报一堆的警告,然后apt-get就一直出现以下错误:

sudo apt-get install appstream
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
将会同时安装下列软件:
  libappstream4
下列【新】软件包将被安装:
  appstream libappstream4
升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 170 kB 的归档。
解压缩后会消耗 696 kB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://packages.deepin.com/deepin unstable/main amd64 libappstream4 amd64 0.10.3-1 [87.5 kB]
获取:2 http://packages.deepin.com/deepin unstable/main amd64 appstream amd64 0.10.3-1 [82.4 kB]
已下载 170 kB,耗时 0秒 (316 kB/s)  
正在选中未选择的软件包 libappstream4:amd64。
dpkg: 警告: 无法找到软件包 libcolamd2.9.1:amd64 的文件名列表文件,现假定该软件包目前没有任何文件被安装在系统里。
dpkg: 警告: 无法找到软件包 libcamd2.4.1:amd64 的文件名列表文件,现假定该软件包目前没有任何文件被安装在系统里。
dpkg: 警告: 无法找到软件包 libumfpack5.7.1:amd64 的文件名列表文件,现假定该软件包目前没有任何文件被安装在系统里。
dpkg: 警告: 无法找到软件包 linux-headers-4.4.13-040413-generic 的文件名列表文件,现假定该软件包目前没有任何文件被安装在系统里。
dpkg: 警告: 无法找到软件包 libsuitesparseconfig4.4.6:amd64 的文件名列表文件,现假定该软件包目前没有任何文件被安装在系统里。
dpkg: 警告: 无法找到软件包 libccolamd2.9.1:amd64 的文件名列表文件,现假定该软件包目前没有任何文件被安装在系统里。
dpkg: 警告: 无法找到软件包 libamd2.4.1:amd64 的文件名列表文件,现假定该软件包目前没有任何文件被安装在系统里。
dpkg: 警告: 无法找到软件包 libcholmod3.0.6:amd64 的文件名列表文件,现假定该软件包目前没有任何文件被安装在系统里。
dpkg: 无法从致命错误中恢复,中止:
软件包 x11-common 的文件名列表文件含有空的文件名
错误:已到超时限制
E: Sub-process /usr/bin/dpkg returned an error code (2)



Reply Favorite View the author
All Replies
avatar
comzhong
deepin
2017-03-13 22:15
#1
先sudo apt-get update一下试试
Reply View the author
avatar
流水的行云
deepin
2017-03-13 22:19
#2
本帖最后由 liushui 于 2017-3-13 14:20 编辑
https://bbs.deepin.org/post/135987
先sudo apt-get update一下试试
我按别人的
sudo apt-get autoclean # only removes files that cannot be downloaded anymore (obsolete)
sudo apt-get autoremove
sudo apt-get clean#refresh

sudo apt-get update #resync package index
sudo apt-get upgrade #newest versions of all packages, update must be run first
#would upgrade you to the latest kernel in the repositories
#dist-upgrade is also able to remove existing packages if required/and install held back packages,

sudo apt-get dist-upgrade
sudo apt-get -f install
sudo dpkg --configure -a
All that does is update it again.
试过了,都无效
Reply View the author
avatar
流水的行云
deepin
2017-03-13 22:21
#3
而且现在运行apt update 还会出现超时的错误:
sudo apt-get update
命中:1 http://packages.deepin.com/deepin unstable InRelease
错误:已到超时限制           
正在读取软件包列表... 完成
Reply View the author
avatar
bigben446
deepin
2022-06-06 07:18
#4

dpkg: 警告: 无法找到软件包 XXX 的文件名列表文件,现假定该软件包目前没有任何文件被安装在系统里。

目前的解决办法就是重新安装对应软件包:

sudo apt reinstall xxx

如果过多此类警告,可以一键重新安装所有软件(需要花费大量时间):

sudo apt-get --reinstall install dpkg --get-selections | grep '[[:space:]]install' | cut -f1

Reply View the author