ubuntu22.04更新yum源

时间:2022-10-01 19:57:04

系统安装完成,无法安装软件

官网预写的源访问不通​​http://archive.ubuntu.com/ubuntu​

解决办法

更改为国内源

root@jupyter:/etc/apt# find / -name sources.list
/etc/apt/sources.list
cp /etc/apt/sources.list /etc/apt/sources.list.bak
vi /etc/apt/sources.list
# 清空内容,写入下方代码块
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

验证

apt-get udpate

apt-get install 软件名