Add add-apt-repositor to Codeanywhere Container

When using Codeanywhere, you might be using an Ubuntu 14.04 container. If you want to use:

add-apt-repository

You will get an “command not found” error.

To solve this problem, install apt-file:

sudo apt-get install apt-file

Now run:

apt-file update

You can search now for the command:

apt-file search add-apt-repository

Output will be something like this:

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

This means, you have to install the software-properties-common package:

sudo apt-get install software-properties-common

Now, you should be able to use add-apt-repository.