BUG描述
前两天在虚拟机Vmware中安装了Ubuntu18.04操作系统,因为需要安装其他工具。所以想着执行命令
sudo apt-get update
更新一下系统,以便进行安装。结果出现“E: The repository ‘http://xxx Release‘ does not have a Release file.”以及“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-cache > /dev/null; fi'”的报错。
BUG解决思路
解决办法是:修改系统源文件sources.list的源地址;如果未解决,检查网络是否被监控,切换其他网络试试,例如开一个手机热点;更新过于老旧或者缺少的软件包
BUG详细解决办法
一、修改系统源文件sources.list的源地址;
1、首先,先备份原来源文件sources.list
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bcakup
2、使用gedit编辑,更改源文件sources.list内容
执行命令:
sudo gedit /etc/apt/sources.list
删除sources.list内容,并将以下内容全部复制到sources.list中
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports mai