Ubuntu 16.04 (sudo apt-get update)出现:Problem executing scripts APT::Update::Post-Invoke-Success '

时间:2021-01-11 02:40:01

错误:

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

在运行sudo apt-get update时出现如上信息,解决方法如下:在终端运行如下命令:

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

就可以解决了,虽然还是有些小错误,但不影响使用了。

至于为什么要这样做?请见:https://askubuntu.com/questions/774986/appstreamcli-hanging-with-100-cpu-usage-during-update


相关文章