Why cannot add PPA deadsnakes?

I have ubuntu version 20.04 and I would like to install python 3.6 from the shell. After sudo apt install software-properties-common I am trying to use the add-apt-repository ppa:deadsnakes/ppa command but I am getting this error:

Cannot add PPA: 'ppa:~deadsnakes/ubuntu/ppa'. ERROR: '~deadsnakes' user or team does not exist 

Did I forget any steps or does the repository no longer work?

2

6 Answers

You're probably behind a coporate proxy and to add -E to your sudo command to preserve the environment variables.

$ sudo add-apt-repository -y 'ppa:deadsnakes/ppa' Cannot add PPA: 'ppa:~deadsnakes/ubuntu/ppa'. ERROR: '~deadsnakes' user or team does not exist. $ sudo -E add-apt-repository -y 'ppa:deadsnakes/ppa' This PPA contains more recent Python versions packaged for Ubuntu. Disclaimer: there's no guarantee of timely updates in case of security problems or other issues. If you want to use them in a security-or-otherwise-critical environment (say, on a production server), you do so at your own risk. Update Note =========== ... 
1

I got this error with a fresh Ubuntu installation in a VM and none of the other answers worked for me. However, this command solved the problem for me:

sudo apt-get install --reinstall ca-certificates 

(Credits: this was answered here at a related question.)

1

Just type this before running ppa command:

sudo apt install software-properties-common -y 

Did you check the existence of /etc/apt/sources.list.d? After messing around with my ppa, I found that I had not created that directory. If this is also your case, please do

$ sudo mkdir /etc/apt/sources.list.d $ sudo add-apt-repository ppa:deadsnakes/ppa 

also, as @kuropan suggested, there is no need for add the ~ before 'deadsnakes'

I'm using ubuntu 20.04.1 LTS

I had the same problem, but was on a Docker container, so no sudo was avilable. I was able to manually add the repository at /etc/apt/sources.list:

deb YOUR_UBUNTU_VERSION_HERE main 

I was on 16.04, so used xenial.

then:

apt-key adv --keyserver --recv-keys BA6932366A755776 

You should be able to install python 3.6 with

apt-get install python3.6 

For people having issues running this within a Dockerfile, changing:

RUN add-apt-repository ppa:deadsnakes/ppa 

to:

RUN add-apt-repository 'ppa:deadsnakes/ppa' 

Fixed the problem for me.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like