Certbot-auto fails while setting up virtual environment, complains about package hashes

Hey all I just did the following and it worked around the problem for me

pip install pycparser==2.13

Give it a try

I was trying to upgrade to cryptography-1.5.2.tar.gz with a pip install cryptography

Unfortunately, it doesn’t work for me

My platform: Ubuntu 14.04.5 LTS, Python 2.7.6, pip 8.1.2

Just tried it too. Didn’t work for me either. Is there something else you might have done?

same problem here too. ubuntu 16.04 LTS

Same issue…
Ubuntu 14.04, python 2.7.6, pip 8.1.2

On my 14.04 I ended up removing pycparser from the list and simply adding another pip call with URL mentioned at #147: git+https://github.com/eliben/pycparser@release_v2.14

That’s still not a solution, unless you want certificates right now :slight_smile:

I am also having the same issue on CentOS 7

Same issue
Debian GNU/Linux 8.6 (jessie), Python 2.7.9

Dudes, this helps:

diff --git a/letsencrypt-auto b/letsencrypt-auto
index 80f39cf..6ebadb1 100755
--- a/letsencrypt-auto
+++ b/letsencrypt-auto
@@ -574,8 +574,6 @@ argparse==1.4.0 \
 
 # This comes before cffi because cffi will otherwise install an unchecked
 # version via setup_requires.
-pycparser==2.14 \
-    --hash=sha256:7959b4a74abdc27b312fed1c21e6caf9309ce0b29ea86b591fd2e99ecdf27f73
 
 cffi==1.4.2 \
     --hash=sha256:53c1c9ddb30431513eb7f3cdef0a3e06b0f1252188aaa7744af0f5a4cd45dbaf \
@@ -912,6 +910,8 @@ UNLIKELY_EOF
     # Set PATH so pipstrap upgrades the right (v)env:
     PATH="$VENV_BIN:$PATH" "$VENV_BIN/python" "$TEMP_DIR/pipstrap.py"
     set +e
+    #XXX
+    $VENV_BIN/pip install git+https://github.com/eliben/pycparser@release_v2.14
     PIP_OUT=`"$VENV_BIN/pip" install --no-cache-dir --require-hashes -r "$TEMP_DIR/letsencrypt-auto-requirements.txt" 2>&1`
     PIP_STATUS=$?
     set -e

As a tmp solution, of course.

1 Like

Thanks, murchik. It works.

I am so sorry I had a copy paste fail.

What is meant to write was

pip install pycparser==2.13

I downgraded my pycparser to 2.13 and then I could install cryptography fine

pip install cryptography

Adding “–no-binary pycparser” as recommended in the pycparser git issue tracker worked for me on a Raspberry Pi with Raspbian Jessie:

Change certbot-auto as follows:

diff --git a/certbot-auto b/certbot-auto
index 80f39cf..aba3a28 100755
--- a/certbot-auto
+++ b/certbot-auto
@@ -575,7 +575,8 @@ argparse==1.4.0 \
 # This comes before cffi because cffi will otherwise install an unchecked
 # version via setup_requires.
 pycparser==2.14 \
-    --hash=sha256:7959b4a74abdc27b312fed1c21e6caf9309ce0b29ea86b591fd2e99ecdf27f73
+    --hash=sha256:7959b4a74abdc27b312fed1c21e6caf9309ce0b29ea86b591fd2e99ecdf27f73 \
+    --no-binary pycparser

 cffi==1.4.2 \
     --hash=sha256:53c1c9ddb30431513eb7f3cdef0a3e06b0f1252188aaa7744af0f5a4cd45dbaf \
3 Likes

I confirm @seadog 's fix works on Ubuntu 14.04 LTS aswell.

I confirm @seadog fix too, worked on Ubuntu 14.04. Thanks!

Even i am facing the same issue . in ubuntu 14.04,

I also confirm that @seadog 's fix works on Ubuntu 14.04 LTS. You have to modify your certbot-auto script and add that one line after --hash=sha256... like so:

pyparser==2.14 \ --hash=sha256:7959b4a74abdc27b312fed1c21e6caf9309ce0b29ea86b591fd2e99ecdf27f73 \ --no-binary pycparser

instead of:

pyparser==2.14 \ --hash=sha256:7959b4a74abdc27b312fed1c21e6caf9309ce0b29ea86b591fd2e99ecdf27f73 \

Hey! @pfzero

please let me how edit that file in ubuntu…

i confirm @seadog fix too, it worked on Ubuntu 14.04,

sudo nano certbot-auto search for : pycparser==2.14 in the file

add --no-binary pycparser

below --hash=sha256:7959b4a74abdc27b312fed1c21e6caf9309ce0b29ea86b591fd2e99ecdf27f73 \

save the file and execute it

Thanks!

Issue has been resolved :slight_smile:

Phew. @nickschwab is correct that this issue has been resolved. For those that are curious, I wrote up a bit of a postmortem about what happened on our GitHub repo:

2 Likes