[SOLVED] Lets Encrypt not working on Raspberry Pi


#1

Hello all,

After about 1 hour of testing and going back and forth between fix solutions, I finally gave up and I’m just asking here.
So I want to use Let’s encrypt on my Raspberry pi 2. i followed this tutorial. However I’m getting an error about ‘virtualenv’ (full output below). I look to mutiple sulotions about this problem.
I already installed the package using pip, but to no avail.

Reading package lists... Done
W: GPG error: http://http.debian.net wheezy-backports Release: The following signatures couldn't be verified     because the public key is not available: NO_PUBKEY *some key here* NO_PUBKEY *another key here*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package virtualenv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'virtualenv' has no installation candidate`

I removed the public keys just to be sure.

I hope this is enough info, if not please ask.

Greating,

Jimi


#2

Hi Jimi,

You need to add the relevant keys for the wheezy backports

gpg --keyserver pgpkeys.mit.edu --recv-key "whatever the public key is"
gpg -a --export “whatever the public key is” | sudo apt-key add -


#3

Thanks for the quick reply Serverco.

After adding both keys, it’s still not working.
I still get this error:

Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package virtualenv is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'virtualenv' has no installation candidate

I have seen other people run in to this error, and for them it was solved by installing it manually with pip.
I did that but still nothing.


#4

I don’t have a Rasberry Pi to test with, to see exactly which packages you need to install for the “virtualenv” which is missing.

Personally I use an alternate client, as it has a lot less dependencies, so (to me ) works much more easily on some devices. You can see a list of alternative clients here - My own preference is a bash one ( https://github.com/lukas2511/letsencrypt.sh or https://github.com/srvrco/getssl )


#5

Again thanks for the quick response.

I tried the alternative bash one you recommended (the first one) but i still get an error.
It says that the challange being invalid.

"error":{"type":"urn:acme:error:unauthorized","detail":"Invalid response from http://*my-site-here*/.well-known/acme-challenge/*some-long-code* [*my-ip-here*]: 404"}

Is this something known?


#6

LE verifies your domain by placing a given file in a specific location

http://my-site-here/.well-known/acme-challenge/some-long-code

This then needs to be reachable from the internet in general ( for LE to verify it).

So, can you reach that location ? is your domain on a publicly accessible IP address ? have you got any .htaccess rules or firewall rules preventing access to that location ?


#7

Well I can add the dir .well-known and acme-challenge.
However the long code is different every time…
So i can’t just predict which one the server is gonna use…
Am I doing something wrong?


#8

That’s fine. The code will be different every time ( as will the contents of the file).

If you add a file ( say http://my-site-here/.well-known/acme-challenge/test123) with contents “result-456” … can you reach it in your browser from the general internet ?


#9

Yep, file added and i can open it in my browser (not localhost).

Also i have no weird .htaccess only the apache conf


#10

Can you also test via a proxy ( or some other route from outside ) ? or (if you are happy to ) private message me the domain name and I’ll check.

If it’s fully accessible from outside, then you should be OK ( the 404 error suggested it wasn’t reaching that file though )


#11

Just incase other people have the same problem.
It was fixed using the bash version made by Serverco


#12

I’m using letsencrypt on Raspberry pi 2 and it is working from official Github repository. I just cloned repository, and launched letsencrypt-auto with webroot.