Issues with Python 3.6 ppa on Ubuntu 18.04 LTS

It seems the ppa for Python 3.6 is no longer available and it's causing the scripts to fail:

TASK [apt] **********************************************************************************************************************************************************************************
[WARNING]: Could not find aptitude. Using apt-get instead

fatal: [192.168.253.21]: FAILED! => {"changed": false, "msg": "Failed to update apt cache: W:Updating from such a repository can't be done securely, and is therefore disabled by default., W:See apt-secure(8) manpage for repository creation and user configuration details., E:The repository 'http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu bionic Release' no longer has a Release file."}

Im unable to remove it from the cache for some reason - i've tried

sudo add-apt-repository -r ppa:jonathonf/python-3.6

As well as

sudo ppa-purge ppa:jonathonf/python-3.6

Any idea if I can remove it manually somehow to allow the deployment to continue?

This from Jonathonf:

https://launchpad.net/~jonathonf/+archive/ubuntu/python-3.6
This PPA has been removed from public access as part of a protest against the abuse of open-source projects by large companies. For more detail visit the main page here: https://launchpad.net/~jonathonf

If you are a company and you would like this PPA to continue then let me know your preferred route for contributions and I will arrange something.

If we have already been in contact then ping me your Launchpad ID and I will add you to a private PPA in the meantime.

Just replying to my own post - I found the references in /etc/apt/sources.list.d
so

sudo rm /etc/apt/sources.list.d/*jonathon*

resolved this one

OK, seems I spoke too soon. The Ansible scripts fail with:

TASK [common_installs : Add Python PPA for bionic and xenial] *******************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: apt.cache.FetchFailedException: E:The repository 'http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu bionic Release' does not have a Release file.
fatal: [192.168.253.21]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File "", line 114, in \n File "", line 106, in _ansiballz_main\n File "", line 49, in invoke_module\n File "/tmp/ansible_apt_repository_payload_PWnHXY/main.py", line 554, in \n File "/tmp/ansible_apt_repository_payload_PWnHXY/main.py", line 546, in main\n File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 559, in update\n raise FetchFailedException(e)\napt.cache.FetchFailedException: E:The repository 'http://ppa.launchpad.net/jonathonf/python-3.6/ubuntu bionic Release' does not have a Release file.\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

Hi Ed,

Sorry about this mess, we are working on figuring out the best workaround for this, but if the target machines already have the packages installed, you should be able to deploy by removing this dependency from your ansible deploy scripts (and removing the line from the apt sources as you did)

https://github.com/dimagi/commcare-cloud/blob/55fa0571aac410ed2f666542edf58b07b0c1ce86/src/commcare_cloud/ansible/roles/common_installs/tasks/main.yml#L27

-Clayton

Thanks Clayton, will do!

Hi ! I am facing a similar issue


Can you please guide and help me out? this is preventing my system to update.
I have already done all the steps above to mention.

update:I followed this link [Solved] Could not get lock /var/lib/dpkg/lock Error in Ubuntu adn How to Remove or Delete PPA in Ubuntu Linux and deleted the PPA file manually from the script.
Hope it helps!

Hi Jaihonikhil,

Can you please move the filename starts with jonathon to other path from /etc/source.list.d and try update

Thanks,
Sanjay

Thanks for adding the update. That's super useful!

I am curious how the PPA for Python 3.6 got there. I think Ubuntu 18.04 uses Python 3.6 by default, so I'm not sure why it needs that PPA. Do you know whether this machine upgraded from a previous version of Ubuntu?

Hi @Norman_Hooper
Speaking for myself, this happened out of the box when running the scripts on a clean install on 18.04. I haven't run them recently.

Thanks, @erobinson. The link Clayton posted explains it: It used to be part of the deployment, but it isn't any longer.

No worries, I'll give it a spin myself when I have a gap and provide feedback. Thanks!