To fix the error sudo: add-apt-repository: command not found is quite simple.
I got this error while I was trying to add a PPA at school, on a Ubuntu 12.04 LTS Server.
To fix this error, you have to install the software-properties-common:
$ sudo apt-get install software-properties-common
This is all. Now your command for adding PPAs works like a charm.
If you want to find out how I have fixed this error by myself, without external / Google help, read further.
I have search with apt-file for the add-apt-repository and found out in which package is the command located. Apt file searches for files, inside packages and tells you in what package the file you had searched is located.
It is not installed by default, so you need to do this:
$ sudo apt-get install apt-file && apt-file update
This is how you use apt-file for fishing files inside packages:
$ apt-file search add-apt-repository: /usr/share/man/man1/add-apt-repository.1.gz
So, indeed, it is in the python-software-properties package.
Ubuntu Server 12.10 the package is under software-properties-common, and so the command must be modified to
$sudo apt-get install software-properties-common
if you are attempting to install this properties package.
Thank you mike been doing min installs and this has driven me batty
can I upgrade Kdenlive .7.2.1 on Ubuntu 8.10? if so, how? (without facing a new pack of trouble) — add-apt-repository command is not found
i do not know if you can, ubuntu 8.10 is obsolite, so there aren’t any updates from him. also, many ppas don’t have support for such old versions of ubuntu
sudo apt-get install python-software-properties
does not fix the problem on every Ubuntu. On mine it doesn’t do anything.
sudo apt-get install software-properties-common
This worked for me, thanks
This worked for me as well. The one mentioned in the article did not.
Thank you for the blog post.
In my case (ubuntu runing on a chromebook), it wasn’t the python-software-properties that was missing, but rather the software-properties-common package. I found it with the apt-file search.
Same happened with me too
With this command works fine!
sudo apt-get update && sudo apt-get install python-software-properties
Didn’t work with sudo apt-get install software-proprieties-common
but it worked with sudo apt-get install python-software-properties.
Thanks for the tip about “apt-file search” !!