Ubuntu – Error : Running add-apt repository ppa:

16.04aptppa

I am using Ubuntu 16.04 and I'm running this command:

sudo add-apt-repository ppa:paolorotolo/android-studio

and I'm getting this error:

I've even tried reinstalling ca-certificates, but after that the same error occurs.

sudo apt-get install --reinstall ca-certificates

Best Answer

I was able to add it using the command above. The error message indicates that the host where the repository is stored is not resolvable by your DNS server. But I think that's probably a red-herring. Deleting the ca-certificates and then reinstalling them should work;

rm -rf /usr/share/ca-certificates

apt-get --reinstall install ca-certificates