Ubuntu – Adding a PPA to add-apt-repository

add-apt-repositoryapt

I'm trying to add the ubuntu-toolchain-r/test with:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test

But it comes back with:

Cannot add PPA: 'ppa:ubuntu-toolchain-r/test'.
Please check that the PPA name or format is correct.

Best Answer

That is odd! You appear to be using the correct syntax.

You could try adding the ppa with the full path of the PPA, rather than the "ppa" abbreviation. Try running the following in a console:

sudo apt-add-repository "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main"

Let me know what happens!

edit: this is assuming you're running Xenial (16.04); otherwise, replace the xenial in the "deb" line with trusty or utopic or whatever version you're running.

Please let me know if this helps or if you have other questions.

--Nick