【解决方案】优麒麟换源 (apt-get)(修改/etc/apt/sources.list,替换为华为云镜像)

前言

创作开始时间: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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值