2

修复 add-apt-repository command not found 错误

 2 years ago
source link: https://www.sulinehk.com/post/fix-add-apt-repository-command-not-found/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

修复 add-apt-repository command not found 错误

2019-09-21

本文将向你展示如何修复在 Ubuntu、Debian 和其它基于 Debian 的 Linux 发行版上出现的 add-apt-repository command not found 错误。

Debian Logo

我们在 Ubuntu 和 Debian 上安装软件包时经常会使用到 PPA(Personal Package Archive)。

如果要添加新的 PPA 存储库,则需要使用 add-apt-repository 命令,如:

sudo add-apt-repository ppa:example/ppa

但有时会出现 add-apt-repository 命令未找到的错误,如:

sudo: add-apt-repository: command not found

发生这个错误的原因是该系统未安装 add-apt-repository 命令。

但如果你使用 sudo apt-get install add-apt-repository 是无法修复的。

这是因为 add-apt-repository 命令实际上是软件包 software-properties-common 的一部分。

所以我们应该安装该包,如:

sudo apt-get install software-properties-common

安装完成后应使用如下命令更新系统:

sudo apt-get update

更新完后使用 add-apt-repository 添加 PPA 时就不会发生错误了。

文章作者 sulinehk

上次更新 2019-09-21

许可协议 CC BY-NC-ND 4.0

Authentication 和 Authorization 之间的区别

在 Go 语言项目中使用 Docker


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK