Skip to content

Instantly share code, notes, and snippets.

@ritiek

ritiek/README.md

Last active Jul 10, 2020
Embed
What would you like to do?
Adding a 3rd party apt repository

I wanted to specifically install libpython3.7-dev but it wasn't available in my default apt repositories. My apt repositories had libpython3.8-dev which wouldn't work for my specific use-case.

I am on PopOS 20.04. So the corresponding debian codename would be "buster".

I noticed that it was available in https://debian.pkgs.org/10/debian-main-amd64/libpython3.7-dev_3.7.3-2+deb10u1_amd64.deb.html. But it's really hard to keep resolving dependencies.

I needed apt to fix it for me.

I noticed this ftp download URL in the above link: http://ftp.br.debian.org/debian/pool/main/p/python3.7/libpython3.7-dev_3.7.3-2+deb10u1_amd64.deb

So I added this to my /etc/apt/sources.list:

deb http://ftp.br.debian.org/debian/ buster main

(buster being the debian codename that matched with my PopOS 20.04)

I ran:

$ sudo apt update

but got these errors:

W: GPG error: http://ftp.br.debian.org/debian buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 04EE7237B7D453EC NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY DCC9EFBF77E11517         
E: The repository 'http://ftp.br.debian.org/debian buster InRelease' is not signed.                                                                                                                                                             
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

I then ran:

$ sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net:80 --recv-keys 04EE7237B7D453EC

for each public key (replace 04EE7237B7D453EC with the next missing key and run again).

Then

$ sudo apt update

worked fine.

And yes, I am now able to install the originally missing libpython3.7-dev package now with apt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.