Linux Collection:源和更新
阿新 • • 發佈:2019-01-06
PAS 配置sources.list
軟體源
參考例子(Debian 9,檔案/etc/apt/sources.list
):
deb https://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian/ stretch main contrib non-free deb https://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian/ stretch-updates main contrib non-free deb https://mirrors.ustc.edu.cn/debian/ stretch-backports main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian/ stretch-backports main contrib non-free deb https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free deb-src https://mirrors.ustc.edu.cn/debian-security/ stretch/updates main contrib non-free
國內的軟體源映象(Arch Linux, Centos, Debian, Fedora, OpenSUSE, Ubuntu等):
Debian/Ubuntu的軟體源配置檔案在/etc/apt/sources.list
,具體可以參見相關映象網站的配置幫助。
線上配置網站:USTC repository file generator
- Debain 參考手冊(中文版)
sources.list
中使用https
,需要安裝apt-transport-https
PAS apt search精確匹配包名
- 方式一:使用正則表示式
apt search ^packagename$
- 方式二:使用命令引數
apt search --names-only packagename
- apt search: limit to exact match, askubuntu.com
PAS 關於Ubuntu PPA
- update-alternatives: display, install, remove, config
- PPA,或是Personal Package Archive(個人軟體包存檔):不一定是官方
sudo add-apt-repository ppa_name
sudo apt-get update
sudo apt-get install 軟體名稱
PAS Linux更新出現error The following signatures couldn't be verified because the public key is not available
錯誤
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 40976EAF437D05B5
gpg --keyserver wwwkeys.pgp.net --recv-keys AED4B06F473041FA
gpg -a --export AED4B06F473041FA |apt-key add -