This brief tutorial shows students and new users how to quickly and easily fix the sudo: add-apt-repository: command not found error when using Ubuntu 18.04 | 16.04.
Most Ubuntu users tend to install the Ubuntu minimal server version. With the minimal version of Ubuntu, you get a limited set of tools and packages, which are just enough to operate the server in most environments.
Because of the limited tools available, you may run into situations where some needed tools are not installed out of the box.
For example, if you want to add a new PPA repository, use the add-apt-repository command. But with the Ubuntu server minimal version, the command is not installed by default. You’ll need to install it before using it.
Resolve add-apt-repository: command not found
Fixing the add-apt-repository: command not found an error in Ubuntu is simple. The add-apt-repository command depends on software-properties-common, and it doesn’t come installed.
Run the commands below to install software-properties-common.
sudo apt update sudo apt install software-properties-common
Then, update Ubuntu and try to add a PPA repository using the add-apt-repository.
sudo apt update
Now you can add your PPA as shown below:
Example:
sudo add-apt-repository ppa:nginx/development
That’s it!
Conclusion:
This post shows you how to quickly and efficiently resolve the add-apt-repository: command not found error on Ubuntu 18.04 | 16.04 systems. If you find any error above, please use the form below to report it.
Thanks,
You may also like the post below:
Leave a Reply