ubuntu apt更新报错

Linux / 117人浏览 / 0人评论

在安装软件的时候遇到一下报错

root@iZ2816fx45sZ:~# apt install htop
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package htop

这是因为本地库和线上不一致
需要进行update
root@iZ2816fx45sZ:~# apt update
Get:1 https://download.docker.com/linux/ubuntu bionic InRelease [64.4 kB]                                                 
Get:2 https://download.docker.com/linux/ubuntu bionic/stable amd64 Packages [13.0 kB]                                     
Ign:3 http://mirrors.aliyun.com/ubuntu vivid InRelease                                        
Ign:4 http://mirrors.aliyun.com/ubuntu vivid-security InRelease        
Ign:5 http://mirrors.aliyun.com/ubuntu vivid-updates InRelease
Ign:6 http://mirrors.aliyun.com/ubuntu vivid-proposed InRelease          
Ign:7 http://mirrors.aliyun.com/ubuntu vivid-backports InRelease                   
Err:8 http://mirrors.aliyun.com/ubuntu vivid Release                               
  404  Not Found [IP: 140.249.226.242 80]
Err:9 http://mirrors.aliyun.com/ubuntu vivid-security Release                      
  404  Not Found [IP: 140.249.226.242 80]
Err:10 http://mirrors.aliyun.com/ubuntu vivid-updates Release
  404  Not Found [IP: 140.249.226.242 80]
Hit:11 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease
Err:12 http://mirrors.aliyun.com/ubuntu vivid-proposed Release
  404  Not Found [IP: 140.249.226.242 80]
Err:13 http://mirrors.aliyun.com/ubuntu vivid-backports Release
  404  Not Found [IP: 140.249.226.242 80]
Reading package lists... Done
E: The repository 'http://mirrors.aliyun.com/ubuntu vivid Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://mirrors.aliyun.com/ubuntu vivid-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
而update 又报错,经过查询是下载的源路径有问题
打开文件进行链接配置更新
root@iZ2816fx45sZ:~# vim /etc/apt/sources.list

把文件中的内容替换为一下内容
deb http://mirrors.aliyuncs.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyuncs.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyuncs.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyuncs.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyuncs.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyuncs.com/ubuntu/ bionic-backports main restricted universe multiverse

0 条评论

还没有人发表评论

发表评论 取消回复