目录
以下办法是我搜了很久才找到的,对我来说是有用的
1. 报错Could not connect to archive.ubuntukylin.com:10006
W: Failed to fetch http://archive.ubuntukylin.com:10006/ubuntukylin/dists/xenial/InRelease Could not connect to archive.ubuntukylin.com:10006 (120.240.95.35), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.
解决方法
sudo vim /etc/apt/sources.list.d/ubuntukylin.list
进入文件后把 deb http://archive.ubuntukylin.com:10006/ubuntukylin xenial main 注释掉
2. 报错Problem executing scripts APT::Update::Post-Invoke-Success ‘if
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 purge libappstream3
安装完这个依赖后就可以重新执行sudo apt-get update
命令了,不过我在执行完后,就是代码就只有几条
相比之前如下图所示是少了很多行的
不过这个应该是命令重复使用的问题,总之sudo apt-get update
命令下出现的问题都已解决。