[Easy Fix] 找不到add-apt-repository命令

在本快速教程中 治愈“找不到add-apt-repository命令。Debian,Ubuntu和其他基于Debian的Linux发行版出错。


最新版的Ubuntu 19.10、18.04、16.04,Debian 10/9/8(add-apt-repository命令实用程序)包含在software-properties-common软件包中。 因此,使用以下命令安装它:

# sudo apt-get install software-properties-common


Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 9,912 B of archives.
After this operation, 197 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 software-properties-common all [9,912 B]
Fetched 9,912 B in 2s (5,685 B/s)                      
Selecting previously unselected package software-properties-common.
(Reading database ... 265950 files and directories currently installed.)
Preparing to unpack .../software-properties-common_0. ...
Unpacking software-properties-common ( ...
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for dbus (1.12.2-1ubuntu1) ...
Setting up software-properties-common ( ...


# sudo apt-get update

现在,您可以使用add-apt-repository或apt-add-repository命令轻松地添加PPA。 我们希望该快速提示将帮助您修复Ubuntu和其他基于Debian的Linux发行版上的“ add-apt-repository:找不到命令”错误。 而已。 愉快。 另请参阅:如何将apt存储库添加到Ubuntu / Debian Linux