Debian

Install add-apt-repository for Ubuntu/Debian Packages

If you have a minimal installation of Ubuntu or Debian, chances are you may not have commandadd-apt-repository present in your system. If you get the error “add-apt-repository command not found” while trying to add PPA repository, you’ll need to install add-apt-repository

Original content from computingforgeeks.com - post 4962

For those new to Debian package management, add-apt-repository is a command line tool used for adding Personal Package Archive (PPA ) in Debian family Linux distributions. With this command line tool it becomes so easy to install third-party repositories into your system, and install packages not available in the official Ubuntu or Debian repositories. This command is created to enhance your system’s functionality by enabling you access lots of packages and software applications from third party developers.

install add apt repository debian ubuntu

Install add-apt-repository on Ubuntu Linux systems

If your system is missing add-apt-repository command, install the software-properties-common package by running the following command in your terminal:

sudo apt update
sudo apt -y install software-properties-common dirmngr apt-transport-https lsb-release ca-certificates

You can now add PPA repository with the syntax:

sudo add-apt-repository ppa:<PPA Name>

The example below add PHP PPA repository

sudo add-apt-repository ppa:ondrej/php

If you get an error message “codeDecodeError: ‘ascii’ codec can’t decode byte 0xc5”, set Locale before running the add-apt-repositorycommand:

sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php

Once the PPA repository is added, update the package list and install your new package from the repository.

sudo apt update
sudo apt install <package>

That’s all. Enjoy using add-apt-repository on your Ubuntu or Debian system.

Related Articles

Monitoring Install Zabbix Server 6.0 on Ubuntu 22.04 (Jammy Jellyfish) Ubuntu Install KDE Plasma Desktop on Ubuntu 22.04|20.04|18.04 Cloud Create CentOS|Ubuntu|Debian VM Templates on OpenNebula Kubernetes Install Kubernetes Cluster on Ubuntu 24.04 with Kubeadm

Leave a Comment

Press ESC to close