Linux arm64架构修改软件源 (统信UOS,麒麟系统修改阿里源、华为源) 国产系统UOS修改apt源

本文参考链接

https://blog.csdn.net/weixin_42328170/article/details/107411026
本文介绍华为arm架构主机使用国内源配置

1.备份系统之前的源

cp /etc/apt/sources.list /etc/apt/sources.list.bak

2.修改源文件/etc/apt/sources.list

vim /etc/apt/sources.list

将原来的内容删除,将下面的源内容粘贴上。
这里推荐比较好的两个国内源

  1. 阿里源(arm64)
deb http://mirrors.aliyun.com/ubuntu-ports/ xenial main
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial main
 
deb http://mirrors.aliyun.com/ubuntu-ports/ xenial-updates main
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial-updates main
 
deb http://mirrors.aliyun.com/ubuntu-ports/ xenial universe
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial universe
deb http://mirrors.aliyun.com/ubuntu-ports/ xenial-updates universe
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial-updates universe
 
deb http://mirrors.aliyun.com/ubuntu-ports/ xenial-security main
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial-security main
deb http://mirrors.aliyun.com/ubuntu-ports/ xenial-security universe
deb-src http://mirrors.aliyun.com/ubuntu-ports/ xenial-security universe
  1. 华为源

机型为华为推荐使用此源

deb https://repo.huaweicloud.com/ubuntu-ports/ bionic main restricted universe multiverse
deb-src https://repo.huaweicloud.com/ubuntu-ports/ bionic main restricted universe multiverse
 
deb https://repo.huaweicloud.com/ubuntu-ports/ bionic-security main restricted universe multiverse
deb-src https://repo.huaweicloud.com/ubuntu-ports/ bionic-security main restricted universe multiverse
 
deb https://repo.huaweicloud.com/ubuntu-ports/ bionic-updates main restricted universe multiverse
deb-src https://repo.huaweicloud.com/ubuntu-ports/ bionic-updates main restricted universe multiverse
 
deb https://repo.huaweicloud.com/ubuntu-ports/ bionic-backports main restricted universe multiverse
deb-src https://repo.huaweicloud.com/ubuntu-ports/ bionic-backports main restricted universe multiverse
 
## Not recommended
# deb https://repo.huaweicloud.com/ubuntu-ports/ bionic-proposed main restricted universe multiverse
# deb-src https://repo.huaweicloud.com/ubuntu-ports/ bionic-proposed main restricted universe multiverse
  1. 处理报错
    使用命令
apt-get update

可能出现报错
image
使用以下命令解决

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 40976EAF437D05B5 3B4FE6ACC0B21F32
  1. 清除软件仓库缓存
apt-get clean
  1. 更新软件仓库
apt-get update

完成,apt-get install 应用名 就可以安装应用了

posted @ 2022-03-22 13:48  minseo  阅读(2102)  评论(0编辑  收藏  举报