ubuntu ppa源管理

2020-02-21  本文已影响0人  明月清风_5c62

参考:Using PPA in Ubuntu Linux

PPA ,Personal Package Archive,即为个人软件包存档。

一、PPA介绍

##163源
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse

当执行 sudo apt update检查更新信息时, APT 工具根据地址检查在线存储库,并将有关软件及其版本的信息存储到缓存中。 执行sudo apt install package_name 安装软件时,系统就会使用该信息从存储实际软件的 URL 获取该软件包。

然后根据软件源的提示,添加ppa、更新和安装:

sudo add-apt-repository ppa:peek-developers/stable
sudo apt-get update
sudo apt install peek

为了与ubuntu官方仓库源相区分,ppa源不是放在/etc/apt/sources.list, 而是在/etc/apt/sources.list.d 目录中为每个ppa创建了两个相关的文件,一个 .list 文件和一个带有 .save 后缀的备份文件。
查看peek相关的.list文件内容,与/etc/apt/sources.list类似:

$ cat /etc/apt/sources.list.d/peek-developers-ubuntu-stable-bionic.list 
deb http://ppa.launchpad.net/peek-developers/stable/ubuntu bionic main
# deb-src http://ppa.launchpad.net/peek-developers/stable/ubuntu bionic main

二、PPA管理

sudo add-apt-repository ppa:ownername/projectname
sudo apt update
sudo rm /etc/apt/sources.list.d/XXX.list*
ls -l /etc/apt/sources.list.d/

另外,部分不是通过ppa安装的软件包会在安装时把源地址添加到/etc/apt/sources.list文件中,这也算是ppa软件,但是只能通过/etc/apt/sources.list查看。

相关问题

上一篇下一篇

猜你喜欢

热点阅读