E: Problem executing scripts APT::Update::Post-Invoke-Success

在Ubuntu中使用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

 

解决办法:

如果已经有安装 ,最好先移除/usr/bin/appstreamcli,具体解决办法:

cd /tmp && mkdir asfix

cd asfix

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

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

sudo dpkg -i *.deb

至此,问题解决。



我的回答