求助帖,apt用不了
Tofloor
poster avatar
dongjh798
deepin
2020-07-20 04:29
Author
快哭辽……使用apt结果出来这个东西

# apt upgrade
正在读取软件包列表... 有错误!
E: flAbsPath on /var/lib/dpkg/status failed - realpath (2: 没有那个文件或目录)
E: 无法打开文件  - open (2: 没有那个文件或目录)
E: Problem opening
E: 无法解析或打开软件包的列表或是状态文件。



度娘了一下,有一个帖子正是这个问题:我找着操作了一下,结果到第二步就废废了……
https://blog.csdn.net/qq_33392383/article/details/86415037



~$ sudo mkdir -p /var/lib/dpkg/{alternatives,info,parts,triggers,updates}
[sudo] dongjh 的密码:
~$ sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/status
cp: 无法获取'/var/backups/dpkg.status.0' 的文件状态(stat): 没有那个文件或目录



代码见图……



Reply Favorite View the author
All Replies
avatar
dongjh798
deepin
2020-07-20 04:31
#1
现在开个机都非常慢……也不知道咋回事……
Reply View the author
avatar
Ziggy
deepin
2020-07-20 04:44
#2
看看是不是装了社区商店源的问题,https://bbs.deepin.org/user/223313
Reply View the author
avatar
dongjh798
deepin
2020-07-20 04:53
#3
https://bbs.deepin.org/post/197409
看看是不是装了社区商店源的问题,@shenmo

不应该吧……之前用的还比较正常啊
Reply View the author
avatar
Hello
deepin
2020-07-20 05:04
#4
看报错就知道是缺少啥了吧,不要随便动系统的文件啊
试一试用我这个,
sudo dde-file-manager
然后复制它到目标文件下。
你的文件看报错应该是啥时候被你删掉了
Reply View the author
avatar
Hello
deepin
2020-07-20 05:04
#5
草,不对
Reply View the author
avatar
Hello
deepin
2020-07-20 05:06
#6
status存的是软件和依赖的相关信息,如果没有掉备份文件都没有。。。。。。那只能系统回退
Reply View the author
avatar
叶落随风
deepin
2020-07-20 05:07
#7
本帖最后由 lzhjqc 于 2020-7-19 21:11 编辑

看看这个目录下还有old结尾的文件没了呢,实在不行你建空文件试试看呗。反震你都那样了,还能用。桌面那个感觉同好看的


我把我的上传了,要不你把我的塞进去。
Reply View the author
avatar
Hello
deepin
2020-07-20 05:09
#8
检查一下有没有status-old这个文件,复制一份改成status。。。。。。
如果没有备份
如果没有就用我的那个,但是会产生非常多的问题,因为我还安装了很多其他软件,这样以后你少了依赖用我的status,他会告诉你装了,其实没有。。。。。。那个时候请卸载重装依赖(sudo apt reinstall XX)

Reply View the author
avatar
Hello
deepin
2020-07-20 05:11
#9
另一个方法是新建空文件明明为status,但是结果就是系统认为你一个依赖都没有安装过,更新会产生问题。。。。。。
Reply View the author
avatar
Hello
deepin
2020-07-20 05:19
#10
老哥还在不[滑稽]如果你记得所有包的信息一行一行敲进去也不是不可以[滑稽]
Reply View the author
Comments
dongjh798
2020-07-20 15:33
呃呃呃……这个方法也太刺激了吧……
avatar
神末shenmo
deepin
Spark-App
Q&A Team
2020-07-20 06:11
#11
重装吧,没救了。。。
和星火无关
Reply View the author
avatar
dongjh798
deepin
2020-07-20 15:35
#12
https://bbs.deepin.org/post/197409
重装吧,没救了。。。
和星火无关

真的哭辽……
Reply View the author
avatar
dongjh798
deepin
2020-07-20 15:54
#13
https://bbs.deepin.org/post/197409
看看这个目录下还有old结尾的文件没了呢,实在不行你建空文件试试看呗。反震你都那样了,还能用。桌面那个 ...

root@dongjh798-PC:/var/lib/dpkg# ls -al
总用量 2100
drwxr-xr-x  7 root root    4096 7月  20 07:49 .
drwxr-xr-x 68 root root    4096 7月  17 11:09 ..
drwxr-xr-x  2 root root    4096 7月  17 11:09 alternatives
drwxr-xr-x  2 root root    4096 7月  17 11:09 info
-rw-r-----  1 root root       0 7月  17 11:12 lock
-rw-r-----  1 root root       0 7月  17 11:12 lock-frontend
drwxr-xr-x  2 root root    4096 7月  17 11:09 parts
-rw-r-----  1 root root     276 7月  20 07:49 statoverride
-rw-r-----  1 root root 2117133 7月  20 07:49 status
drwxr-xr-x  2 root root    4096 7月  17 11:09 triggers
drwxr-xr-x  2 root root    4096 7月  17 11:09 updates
root@dongjh798-PC:/var/lib/dpkg# apt upgrade
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
您也许需要运行“apt --fix-broken install”来修正上面的错误。
下列软件包有未满足的依赖关系:
deepin-wine : 依赖: deepin-wine64 (>= 2.18-22~rc0) 但无法安装它 或
                       deepin-wine32 (>= 2.18-22~rc0) 但无法安装它
               依赖: deepin-wine64 (< 2.18-22~rc0.1~) 但无法安装它 或
                       deepin-wine32 (< 2.18-22~rc0.1~) 但无法安装它
E: 有未能满足的依赖关系。请尝试不指明软件包的名字来运行“apt --fix-broken install”(也可以指定一个解决办法)。
root@dongjh798-PC:/var/lib/dpkg# apt upgrade apt --fix-broken install
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
正在修复依赖关系... 完成
E: 无法定位软件包 install


无法定位软件包install是什么鬼……
Reply View the author
avatar
dongjh798
deepin
2020-07-20 16:00
#14
https://bbs.deepin.org/post/197409
检查一下有没有status-old这个文件,复制一份改成status。。。。。。
如果没有备份
如果没有就用我的那个, ...

我突然发现这个文件夹里的文件夹缺很多东西啊,基本该有的都没有啊惊了……也不知道什么时候删掉的……
Reply View the author
avatar
ucSec
deepin
2020-07-20 17:04
#15
apt clean试一试?
Reply View the author
avatar
dongjh798
deepin
2020-07-20 18:18
#16

还是不行,/var/lib/dpkg文件夹里面缺的文件太多了……我也不太清楚怎么回事全没有了……惊了……
Reply View the author