Ubuntu安裝阿里雲鏡像地址
- cd /etc/apt
這個目錄下的sources.list文件
vim /etc/apt/sources.list
- 使用dd全部刪除,然后添加阿里雲的鏡像地址
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
騰訊雲地址
deb http://mirrors.cloud.tencent.com/ubuntu/ bionic main universe restricted multiverse
deb http://mirrors.cloud.tencent.com/ubuntu/ bionic-security main universe restricted multiverse
deb http://mirrors.cloud.tencent.com/ubuntu/ bionic-updates main universe restricted multiverse
deb http://mirrors.cloud.tencent.com/ubuntu/ bionic-backports main universe restricted multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ bionic main universe restricted multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ bionic-security main universe restricted multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ bionic-updates main universe restricted multiverse
deb-src http://mirrors.cloud.tencent.com/ubuntu/ bionic-backports main universe restricted multiverse
如果出現
錯誤:http://mirrors.aliyun.com/ubuntu bionic InRelease
由於沒有公鑰,無法驗證下列簽名: NO_PUBKEY 3B4FE6ACC0B21F32
因為沒有導入公鑰
解決辦法
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32 3B4FE6ACC0B21F32 3B4FE6ACC0B21F32 3B4FE6ACC0B21F32