码迷,mamicode.com
首页 > 移动开发 > 详细

Ubuntu 16.04出现: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'

时间:2017-08-11 10:36:36      阅读:498      评论:0      收藏:0      [点我收藏+]

标签:reading   script   dev   hang   exec   wget   usr   date   pac   

错误:

Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Successif /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

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

 

参考:

https://askubuntu.com/questions/774986/appstreamcli-hanging-with-100-cpu-usage-during-update

Ubuntu 16.04出现: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'

标签:reading   script   dev   hang   exec   wget   usr   date   pac   

原文地址:http://www.cnblogs.com/EasonJim/p/7343892.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!