前言
创作开始时间:2021年11月20日22:25:02
优麒麟的源,apt-get install很慢,所以这里给出替换为华为云的源的方案。
正文
1)先备份一下:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2)修改文件/etc/apt/sources.list
:
sudo gedit /etc/apt/sources.list
原内容为:
deb http://cn.archive.ubuntu.com/ubuntu/ groovy main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ groovy-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ groovy-security main restricted universe multiverse
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
新内容为:
deb http://repo.huaweicloud.com/ubuntu/ groovy main restricted universe multiverse
deb http://repo.huaweicloud.com/ubuntu/ groovy-updates main restricted universe multiverse
deb http://repo.huaweicloud.com/ubuntu/ groovy-security main restricted universe multiverse
# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
3)终端更新一下:
sudo apt-get install
4)然后安装软件就比较快了,比如:
sudo apt install maven
之前是10多k每秒,现在1m每秒。可以了。
小结
emmm。
创作结束时间:2021年11月20日22:28:03
参考文献
- Ubuntu Kylin配置流程 https://www.huaweicloud.com/zhishi/uk.html