备份源文件
- sudo cp -v /etc/apt/sources.list /etc/apt/sources.list.backup
复制代码 执行chmod命令更改文件权限
- sudo chmod 777 /etc/apt/sources.list
复制代码 通过gedit命令编辑软件源
- sudo gedit /etc/apt/sources.list
复制代码 执行上面命令后如果报sudo: gedit: command not found的错误,执行下面命令
- sudo apt install vim vim /etc/apt/sources.list
复制代码 阿里云国内源- deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
- deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
- deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
- deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
复制代码 换完源之后执行以下命令- sudo apt update
- sudo apt upgrade
复制代码 免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作! |