ubuntukylin16.04TLS update報錯

新安裝好的ubuntukylin16.04TLS虛擬機執行

sudo apt-get update

報錯如下:

正在讀取軟件包列表... 完成
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

這是appstreamcli的bug造成的,
具體解決方法,執行:

yangxjsun@ubuntu:~$ sudo pkill -KILL appstreamcli

yangxjsun@ubuntu:~$ 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

yangxjsun@ubuntu:~$ sudo dpkg -i /tmp/appstream_0.9.4-1ubuntu1_amd64.deb /tmp/libappstream3_0.9.4-1ubuntu1_amd64.deb

之後就可以正常update了。

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章