Ubuntu Server 14.4 (Trusty Tahr) – add-apt-repository: command not found

ubuntu-server-logo

The last time I encountered the add-apt-repository: command not found error I was using Ubuntu Server 12.4 Lucid. The solution then was to install python-software-properties as follows:

sudo apt-get install python-software-properties

 

This did not resolve the issue on my minimal virtual machine installation on Trusty so I installed apt-file – which is an apt package searching utility:

sudo apt-get install apt-file

 

Update apt-file:

apt-file update

 

Finally use apt-file to search for the add-apt-repository package:

apt-file search add-apt-repository

 

As you can see add-apt-repository is in software-properties-common:

software-properties-common: /usr/bin/add-apt-repository
software-properties-common: /usr/share/man/man1/add-apt-repository.1.gz

 

After installing software-properties-common I was able to use add-apt-repository without any further issue:

sudo apt-get install software-properties-common
Advertisements

Ubuntu Server 10.4 Lucid – add-apt-repository: command not found

Since Ubuntu 9.10 (Karmic Koala) users have been able to add PPAs (Personal Package Archives) to install packages via the command line as follows:

sudo add-apt-repository ppa:<repository name>

Typically this works out of the box, but not with a minimal Ubuntu Server installation (such as I use in my VMware vSphere environment) which produces the following error:

sudo: add-apt-repository: command not found

The solution is to install python-software-properties:

sudo apt-get install python-software-properties

Source: Ubuntu Forum

.