配置环境问题集

Ubuntu

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’

转自https://www.cnblogs.com/EasonJim/p/7343892.html,侵删。

错误

1
2
3
4
5
6
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

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

1
2
3
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就不会再出现上面的错误。


AppStream cache update completed, but some metadata was ignored due to errors.

转自https://blog.csdn.net/tang05709/article/details/53609234,侵删。

错误

更新Ubuntu时出现AppStream cache update completed, but some metadata was ignored due to errors.

解决方法

sudo rm /var/lib/dpkg/lock

开机时出现Host SMBus controller not enabled

提示

Host SMBus controller not enabled

解决办法

网上试了一些办法,在系统中禁止某些启动项是可以的。

1
2
3
4
# lsmod | grep i2c_piix4 (有输出的话进行以下步骤)
# vi /etc/modprobe.d/blacklist.conf
blacklist i2c_piix4
# reboot

以上做完之后应该就不会再出现了。