ubuntu 18.04更换为国内更新源
在执行ubuntu安装开发环境命令sudo apt update, sudo apt install build-essential时,发现安装速度过慢,可以为ubuntu更换国内更新源。
将/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
保存完毕之后更新一下缓存
sudo apt-get update
sudo apt-get upgrade
本文介绍如何将Ubuntu18.04的软件更新源更改为阿里云镜像以提升安装速度。通过修改/etc/apt/sources.list文件并使用阿里云提供的服务器地址来实现。完成更改后需运行sudo apt-get update和sudo apt-get upgrade命令更新本地包列表。
6754

被折叠的 条评论
为什么被折叠?



