执行sudo apt-get update出现E: Sub-process returned an error code错误
报错提示
Aborted (core dumped)
正在读取软件包列表... 完成
W: 无法下载 http://archive.ubuntukylin.com:10006/ubuntukylin/dists/trusty/InRelease 无法连接上 archive.ubuntukylin.com:10006 (120.240.95.36)。 - connect (111: 拒绝连接)
W: 部分索引文件下载失败。如果忽略它们,那将转而使用旧的索引文件。
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
解决方法
**解决:E: Sub-process returned an error code **
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