CentOS 一直是我主要用的Linux, 现在好了,要停止维护了。这也是醉了。
今天我试一下ubuntu,结果安装完后,软件安装不了,也更新失败。
主要的原因,ubuntu用的是默认不支持国内镜象,结果是你只能失败到放弃了。
现在的版本的win10,已经支持wsl2, 于是我在micrsoft store安装了ubuntu 20.04 LTS,
然后在root下面,修改source.list
$>sudo su
#>cd /etc/apt
#>ll
这个时候,就可以看到有一个sources.list文件
#>cp sources.list sources.list.bak
先备份一个
然后复制到c:的temp目录
#>cp sources.list /mnt/c/temp
在windows下面,用editplus打开编辑
内容如截图:
deb-src http://archive.ubuntu.com/ubuntu hirsute main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ hirsute main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ hirsute main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ hirsute-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ hirsute-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ hirsute universe
deb http://mirrors.aliyun.com/ubuntu/ hirsute-updates universe
deb http://mirrors.aliyun.com/ubuntu/ hirsute multiverse
deb http://mirrors.aliyun.com/ubuntu/ hirsute-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ hirsute-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ hirsute-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu hirsute partner
deb-src http://archive.canonical.com/ubuntu hirsute partner
deb http://mirrors.aliyun.com/ubuntu/ hirsute-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ hirsute-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ hirsute-security universe
deb http://mirrors.aliyun.com/ubuntu/ hirsute-security multiverse
然后再复制回去,就可以apt update了
#>cp /mnt/c/temp/sources.list /etc/apt
#>apt update
就可以了
补充说明:
大家用浏览器访问:http://mirrors.aliyun.com/ubuntu/
可到如下目录 ,再点一下dists
就会看到很多历史版本的镜像
我用的是hirsute,大家可以选择自己的发布:)