apt-get 相关问题

来源:互联网 发布:网络机柜搬迁流程 编辑:程序博客网 时间:2024/06/07 23:39

安装Linux之后,使用apt-get update 出现这个问题

Aborted (core dumped)
Reading package lists… Done
E: Problem executing scripts APT::Update::Post-Invoke-Success ‘if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh > /dev/null; fi’
E: Sub-process returned an error code

解决方法
1.
sudo apt-get remove libappstream3
2.
sudo apt remove libappstream3
因为apt这个命令在最新的Linux版本中兼容apt-get,所以两种方法都可以解决此问题

还有这种方法可以解决
sudo pkill -KILL appstreamcli

wget -P /tmp https://launchpad.net/ubuntu/+archive/primary/+files/appstream_0.9.4-1ubuntu1_amd64.deb https://launchpad.net/ubuntu/+archive/primary/+files/libappstream3_0.9.4-1ubuntu1_amd64.deb

sudo dpkg -i /tmp/appstream_0.9.4-1ubuntu1_amd64.deb /tmp/libappstream3_0.9.4-1ubuntu1_amd64.deb

执行完上述命令之后再次运行sudo apt-get update就不会再出现上面的错误。

要是出现无法取回源的问题 如下

E: Unable to fetch some archives, maybe run apt-get update or try with –fix-missing?

或者前几个源无法访问,则可以修改源镜像访问节点或者先检查是否可以联网,因为一般的话,镜像访问节点都是不需要修改的
目前先写这几个问题,大部分都是自身遇到的一些问题,然后找解决的办法,之后遇到其他问题会持续更新……….

原创粉丝点击