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

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

Ubuntu&Debian最新版本

最新版的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:
  software-properties-common
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 0.96.24.32.5 [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.96.24.32.5_all.deb ...
Unpacking software-properties-common (0.96.24.32.5) ...
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for dbus (1.12.2-1ubuntu1) ...
Setting up software-properties-common (0.96.24.32.5) ...

在安装software-properties-common之后,您需要使用以下命令更新系统:

# sudo apt-get update

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

Sidebar