New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
installation error on amazon linux #1680
Comments
From #1458,
I did that and it seems to be working. You need to run sudo yum install python27-virtualenv and sudo ./bootstrap/_rpm_common.sh |
@barshinoff I'm curious if this is at all related to #1677 (an out of memory error when compiling cffi dependencies on other redhat-family distros) I've checked that ./letsencrypt-auto works on clean installs of amazon linux 2015.09.1 and 2015.03.1 on t2.micro instances with nothing else running. What instance type and AMI are you trying this on? If you run it verbosely with '-v' ./letsencrypt-auto --help --debug -v it might shed more information on what's going on. |
Hi, thanks for the advice. Installing python27-virtualenv package first, then running the RedHat bootstrap path as suggested by @kiwimancy got me past the initial error. |
Same error here on the same 2015.09 Amazon Linux.
I tried bluntly to resolve for pyOpenSSL by manually add |
I have the error as well:
Solution as from @kiwimancy worked:
Next Problem:
Solution:
Next problem:
Solution:
Next problem: The apache plugin is not working; there may be problems with your existing configuration.
I will dig into this later. |
|
OK so I believe I found a solution to this issue. It all comes down to running as root or running via sudo, the use of multiple package locations for pip installation (lib/lib64, site-packages/dist-packages, /usr vs /usr/local). I came across this similar issue: It turns out the pip and virtualenv versions that ship with Amazon Linux, even in the latest AMI, are out of date and (possibly) have bugs in how lib64/dist-packages is handled for virtual environments. Updating both programs via pip and then recreating the virtual environment seems to fix the issue when running the setup as root (not using sudo). The solutions given in other threads and this one to run pip from the virtualenv folder to reinstall dependencies are fixing a symptom, not the cause. Similar issue reported here: |
eric-tucker's solution above worked for me as well. Thank you! |
Came here from Google, had similar issues with all compiled python modules in virtualenv on latest Amazon Linux 2015.09.1. eric-tucker is right, upgrading virtualenv manually helps here. I found that the culprit was env variable The tricky part, at least for me, was finding out which package defined this variable for me. It turned out it was caused by installing "@development tools" group by yum and specifically the |
Yes! I solved!. Thank you eric-tucker ! I ran the following command.
|
Update to @skatsumata for 2017 and certbot-auto:
|
I only had to run |
@zarmstrong Thanks a lot, that works. BTW I want to setup a cron to auto renew. How do I do that with your solution? |
Not sure if this will work, untested. But you can try it.
Be sure to redirect output to some sort of log and verify it works. |
This should be fixed in our next release with #4978. |
@bmw I don't believe this has been fixed. I'm experiencing this same lib/lib64 issue still on AWS Elastic Beanstalk environments with latest version of certbot downloaded as follows:
|
I'm baffled by how much trouble we're having with Python dependencies and what not. Though, if you install certbot via pip, I think things work. Have you tried this @utdrmac ? I know it solved many of my issues. |
Didn't know install via pip was an option. I was following some blog posts about using certbot on beanstalk and their scripts downloaded it as I put above. Perhaps blog post out of date. Testing via pip now:
Appears to have worked! I will adjust my scripts to install certbot using system pip instead of downloading it directly. Perhaps there's some issue with certbots built-in installer/updater in this regard? |
I honesty have no idea why installation via pip isn't the recommended approach on ALL operating systems. The original solution of downloading of a file which tries to setup a virtualenv and fails miserably half the time needs to DIAF. |
The error is with the python path and the use of
The Further, I found that I prefer this approach because it avoids bashing over system-level python packages. |
Not that this says anything different than above, but the quick fix for me on certbot 0.21.1 was to effectively "move" the cryptography hazmat bindings to where letsencrypt's custom version of python is looking:
This works for me because the site-packages/ subdir is empty for me. And to be clear, this addresses the following error that appears on recent certbot versions on Amazon Linux, for me certbot 0.21.0 and 0.21.1:
|
i had same error and i somehow solved it Since i had two versions of python install, python 2 and 3, i had to find out which on certbot/letencrypt was using. that one will report error when trying to import cryptography.... on the command line
no import error, so i did same with python3 and i got the sudo -H cuz it was needed as a global package did Hopes someone finds this helpful |
I had this problem too on an AWS EC2 instance, just fixed by running @utdrmac's solution as root. It was upgrading to certbot 0.22.0 |
Thank you so much @utdrmac for the solution. I have been trying so many things last two days and nothing had worked. |
I ran into this issue today and further found that the @utdrmac solution does not work on AWS EC2 running Amazon Linux AMI 2017.09. The error I encounter at the final step is:
In order to get certbot to run, I was forced to extend this solution by installing a newer Python and utilizing it, thusly:
Note that I separately |
@wwkimball To be fair, my solution/problem was for Elastic Beanstalk. Seems I'm also running AMI 2017.09 so not sure why yours is different from everybody else's. |
I ran into the same problem. Here's what solved it for me: /opt/eff.org/certbot/venv/local/bin/pip install cryptography interface |
@gmegidish 's solution fixed this problem for me. |
Nothing but #1680 (comment) by @wwkimball worked for me. |
FWIW, this is what I threw together to work on my AWS Linux instance:
I chose to leave the
|
@mrballcb Thanks! work perfectly. |
|
./certbot-auto --no-bootstrap This worked for me |
I was able to install and run certbot successfully on Amazon Linux 1 via the pip method (python36 which includes pip). The yum method encountered the below errors which were above my ability to diagnose.
|
@micharu123 Thanks for your post your solution fixed the same issue for me. Cheers |
I had some of the same problems that are mentioned here, and the solution was simply move the "certbot-auto" executable to /usr/local/bin/ . This fixed every single error inmediatly on my AWS server. |
I ran
./letsencrypt-auto --help --debug
to install lets encrypt.
All packages successfully installed but then the following error occurs:
Creating virtual environment...
Updating letsencrypt and virtual environment dependencies......Command "/root/.local/share/letsencrypt/bin/python2.7 -c "import setuptools, tokenize;file='/dev/shm/pip-build-OslHtf/cffi/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-lx9pFX-record/install-record.txt --single-version-externally-managed --compile --install-headers /root/.local/share/letsencrypt/include/site/python2.7/cffi" failed with error code 1 in /dev/shm/pip-build-OslHtf/cffi
Any idea? I realize amazon linux support is experimental and I don't intend to use all the automation tools (yet) but it would be great if I could at least get certificates generated manually.
The text was updated successfully, but these errors were encountered: