apt-get源
--------------------
用途:
設定軟體源,用於快速安裝軟體。
--------------------
圖形化介面
1、桌面右上角,點選設定,選擇“system-settings”
2、選擇download&Updates
3、在Ubuntu選項卡中,在download from中選擇other,找到china中的aliyun。選擇之後點確定即可。
--------------------
命令列頁面
1、編輯源引數
cd /etc/apt/ && sudo cp sources.list sources.list.bak
sudo vim sources.list
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##測試版源
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 原始碼
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##測試版源
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# Canonical 合作伙伴和附加
deb http://archive.canonical.com/ubuntu/ xenial partner
deb http://extras.ubuntu.com/ubuntu/ xenial main
2、更新資源
sudo apt-get update
補充:
1、如果按照某軟體過程中,,出現一直報“0%正在等待報頭”的錯誤。
1)選擇國內源,比如阿里源
2)要把原來的源資訊刪除,重新安裝。
cd /var/cache/apt && sudo rm -rf archives