1. 程式人生 > >Linux Collection:源和更新

Linux Collection:源和更新

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


PAS apt search精確匹配包名

  • 方式一:使用正則表示式
apt search ^packagename$
  • 方式二:使用命令引數
apt search --names-only packagename


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 -