03 September 2017

Add stretch-backports to a Rpi

If you want to use stretch-backports on a Raspberry Pi you can't easily because the Raspberry Pi foundation don't have a repository for it. You can, if you have a Pi2 or Pi3, use the standard Debian repository.

To add the Debian Stretch repository type the following commands into a terminal window or ssh into your Pi and type them in:

sudo apt install dirmngr
gpg --keyserver pgpkeys.mit.edu --recv-key  8B48AD6246925553
gpg -a --export 8B48AD6246925553 | sudo apt-key add -
gpg --keyserver pgpkeys.mit.edu --recv-key  7638D0442B90D010
gpg -a --export 7638D0442B90D010 | sudo apt-key add -



sudo nano /etc/apt/sources.list

Add a line like this:
deb http://deb.debian.org/debian/ stretch-backports main contrib non-free

Do a "sudo apt update" command to refresh the list of available packages.

To add a package that is in backports you can do a "sudo apt install -t stretch-backports xxx" where xxx is the name of the package you want to install.


2 comments:

Michael said...

Thank you, just watch I was looking for!!

Anonymous said...

With a firewall, it is better to use :

sudo apt install dirmngr
gpg --keyserver hkp://pgpkeys.mit.edu:80 --recv-key 8B48AD6246925553
gpg -a --export 8B48AD6246925553 | sudo apt-key add -
gpg --keyserver hkp://pgpkeys.mit.edu:80 --recv-key 7638D0442B90D010
gpg -a --export 7638D0442B90D010 | sudo apt-key add -

else when you use :

gpg --keyserver pgpkeys.mit.edu --recv-key 8B48AD6246925553

you will have the error :

gpg: keyserver receive failed: No data.