如何解决“ add-apt-repository命令未找到”的错误,在Ubuntu,Debian,Mint,Kali中

deb or apt based distributions like Debian, Ubuntu, Mint and Kali uses apt package management system. These distributions provides a lot of packages by default. But in some cases we may need to add extra or third party package into our system. This is done with add-apt-repository . This is not installed by default in these distributions. So we will get following error.

基于debapt的发行版(如Debian,Ubuntu,Mint和Kali)使用apt软件包管理系统。 默认情况下,这些发行版提供了很多软件包。 但是在某些情况下,我们可能需要在系统中添加额外的或第三方软件包。 这是通过add-apt-repository 。 这些发行版中默认未安装此软件。 所以我们会得到以下错误。

找不到命令错误 (Command Not Found Error)

So we want to install ubuntu-wine/ppa  which is 3rd party package repository registered as ppa.

因此,我们要安装ubuntu-wine/ppa ,这是注册为ppa的第三方软件包存储库。

$ sudo add-apt-repository ppa:ubuntu-wine/ppa
add-apt-repository command not found
add-apt-repository command not found
找不到add-apt-repository命令

软件属性通用包装信息(software-properties-common Package Info)

In order to solve `sudo: add-apt-repository: command not found error we need to install the software-properties-common  package. But before installing the package we can list its information with the following command.

为了解决sudo:add-apt-repository:命令未找到错误,我们需要安装software-properties-common软件包。 但是在安装软件包之前,我们可以使用以下命令列出其信息。

$ apt show software-properties-common
software-properties-common Package Info
software-properties-common Package Info
软件属性通用包装信息

安装software-properties-common软件包(Install software-properties-common Package)

We can install apt-software-common  package with the following command. In this case we need root privileges in order to install package into our system so we use sudo .

我们可以使用以下命令安装apt-software-common软件包。 在这种情况下,我们需要root特权才能将软件包安装到我们的系统中,因此我们使用sudo

$ sudo apt install software-properties-common
LEARN MORE  How To Solve " sub process usr bin dpkg returned an error code 1" Error?
了解更多信息如何解决“子进程usr bin dpkg返回错误代码1”错误?

翻译自: https://www.poftut.com/solve-add-apt-repository-command-not-found-error-ubuntu-debian-mint-kali/

  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值