镜像下载
推荐使用华科的镜像:http://mirrors.hust.edu.cn/ubuntu-releases/18.04.4/
安装
大致过程可以参考这篇文章:https://ywnz.com/linuxaz/4715.html,
在选择安装方法的时候, 我采用下面这种更快的方式,如下图
apt源更换
cp /etc/apt/sources.list /etc/apt/sources.list_backup
vim /etc/apt/sources.list
# 选择合适的源,替换原文件的内容
# 阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
刷新列表
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
参考
https://zhuanlan.zhihu.com/p/61228593
来源:oschina
链接:https://my.oschina.net/csp277/blog/3190254