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