Debian – What’s the best way to install apt packages from Debian Stretch on Raspbian Jessie

aptdebian

I'm using Raspbian Jessie but there are a few packages I want that aren't available (but are in Debian Stretch repos). I want to temporarily use the Stretch repo to install them (and any otherwise-unsatisfied dependencies) but without making anything else come from there in the future.

I understand things might not work; etc.; I'm just trying something out on a throwaway install 🙂

I tried rigging some files (based on this answer) but I got this.. not sure a) how to fix it and b) whether I'm doing things the right way!

W: GPG error: http://ftp.uk.debian.org stretch InRelease: The
following signatures couldn't be verified because the public
key is not available:
    NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010

Best Answer

As backports has letsencrypt, I recommend using jessie-backports as it brings less new/packages dependencies than drinking directly from stretch.

To use Jessie backports and install letsencrypt from it:

Add to /etc/apt/sources.list:

deb http://httpredir.debian.org/debian jessie-backports main contrib non-free

The run:

apt-get update

As for installing the key, I confirm you can do:

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

and also with the key 7638D0442B90D010

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

And finally to install letsencrypt:

apt-get install -t jessie-backports letsencrypt
Related Question