Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info

在Ubuntu16.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'


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时出现如上信息:


可以分3步来解决这个问题:


No1:
sudo pkill -KILL appstreamcli  
  
No2:
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_amd
64.deb  
  
No3:
sudo dpkg -i /tmp/appstream_0.9.4-1ubuntu1_amd64.deb /tmp/libappstream3_0.9.4-1ubuntu1_amd64.deb


希望能够对需要的能够有所帮助



你可能感兴趣的:(Ubuntu)