备份原配置文件

sudo cp /etc/apt/source.list /etc/apt/source.list.backup

修改文件   

sudo vi  /etc/apt/source.list

删除原有的所有内容,替换以下内容

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

 !wq保存,即可执行更新

sudo  apt update
sudo  apt upgrade

update命令作用是从配置的软件仓库中获取最新的软件包列表,但不会安装或升级任何软件包。upgrade用于升级系统上已安装的软件包到其最新版本。它只会升级当前安装的软件包,不会安装新添加的软件包或删除不再需要的软件包。如果想同时安装新软件包、升级已安装的软件包和删除不再需要的软件包,应该使用sudo apt full-upgradesudo apt dist-upgrade命令。

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐