错误sudo:add-apt-repository:找不到命令


212

我正在运行Ubuntu 14.04。当我跑步时:

sudo add-apt-repository ppa:ubuntu-wine/ppa

我收到以下错误:

sudo: add-apt-repository: command not found

我试着跑

sudo apt-get install software-properties-common

但它显示:

software-properties-common is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

这是旧帖子,也许OP不再在乎!但是你尝试了sudo apt install software-properties-common --reinstall吗?
Swarnendu Biswas

Answers:



40

如果您使用的是Ubuntu的旧版本(即12.10之前的版本),则必须安装该软件包python-software-properties

sudo apt install python-software-properties

我在Ubuntu 16.04 LTS上遇到了这个问题。此问题已解决,但安装后我还必须重新引导服务器。
Erik Kalkoken
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.