1. 程式人生 > 其它 >Linux arm64架構修改軟體源 (統信UOS,麒麟系統修改阿里源、華為源) 國產系統UOS修改apt源

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

可能出現報錯

使用以下命令解決

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 40976EAF437D05B5 3B4FE6ACC0B21F32
  1. 清除軟體倉庫快取
apt-get clean
  1. 更新軟體倉庫
apt-get update

完成,apt-get install 應用名 就可以安裝應用了