Ubuntu16.04终端执行`sudo apt-get update`遇到appstream问题

Ubuntu 16.04 终端执行sudo apt-get update遇到问题
“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. 32位系统 在终端执行以下命令:

sudo pkill -KILL appstreamcli
wget -P /tmp https://launchpad.net/ubuntu/+archieve/primary/+files/appstream_0.9.4-1ubuntu1_i386.deb
https://launchpad.net/ubuntu/+archive/primary/+files/libappstream3_0.9.4-1ubuntu1_i386.deb

sudo dpkg -i /tmp/appstream_0.9.4-1ubuntu1_i386.deb /tmp/libappstream3_0.9.4-1ubuntu1_i386.deb
执行完上述命令在执行sudo apt-get update即可。

2. 64位系统 终端执行以下命令:

sudo pkill -KILL appstreamcli
wget -P /tmp https://launchpad.net/ubuntu/+archieve/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_i386.deb /tmp/libappstream3_0.9.4-1ubuntu1_amd64.deb
执行完上述命令在执行sudo apt-get update即可。
参考http://www.cnblogs.com/EasonJim/p/7343892.html

猜你喜欢

转载自blog.csdn.net/qq_33251995/article/details/78308339