💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[TOC] 参考链接:[https://blog.csdn.net/xiangxianghehe/article/details/80112149](https://blog.csdn.net/xiangxianghehe/article/details/80112149) ## **更换apt-get 阿里云源** **1.先备份** ``` mv /etc/apt/sources.list /etc/apt/sources.list.backup ``` 将原有的内容注释掉,添加以下内容(或者你把里面内容修改成下面的就可以,但是不能有除了以下内容的有效内容) 打开文件 ``` vi /etc/apt/sources.list ``` 阿里云源 ``` deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse ``` 可以执行命令: ``` echo deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse \ deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse \ deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse \ deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse \ deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse \ deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse \ deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse \ deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse \ deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse \ deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse >> /etc/apt/sources.list ``` 163源 ``` #163源 deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse ``` ***** 更新软件列表 ``` sudo apt-get update ``` 更新软件 ``` sudo apt-get upgrade ``` >总而言之,update是更新软件列表,upgrade是更新软件。 ` ` apt-get update 错误 ``` sudo apt update && sudo apt autoremove -y && sudo apt autoclean && sudo apt full-upgrade -y ``` 增强安装功能 ``` sudo apt-get install --reinstall linux-image-$(uname -r) ```