[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