gcloud failed to load: libssl.so.1.0.0: version `OPENSSL_1.0.2' not found
While trying to use gcloud I'm seeing this error:
ERROR: gcloud failed to load: /tmp/_MEIKmE9I5/libssl.so.1.0.0: version `OPENSSL_1.0.2' not found (required by /usr/lib/python2.7/lib-dynload/_ssl.x86_64-linux-gnu.so)
gcloud_main = _import_gcloud_main()
import googlecloudsdk.gcloud_main
from googlecloudsdk.calliope import cli
from googlecloudsdk.calliope import backend
from googlecloudsdk.calliope import parser_extensions
from googlecloudsdk.core.updater import update_manager
from googlecloudsdk.core.updater import installers
import ssl
import _ssl # if we can't import it, let the error propagate
This usually indicates corruption in your gcloud installation or problems with your Python interpreter.
Please verify that the following is the path to a working Python 2.7 executable:
/usr/bin/python2
If it is not, please set the CLOUDSDK_PYTHON environment variable to point to a working Python 2.7 executable.
If you are still experiencing problems, please reinstall the Cloud SDK using the instructions here:
https://cloud.google.com/sdk/
Here's some system information:
➜ uname -a
Linux stian-Lenovo-Y520-15IKBN 4.13.0-45-generic #50~16.04.1-Ubuntu SMP Wed May 30 11:18:27 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
➜ /usr/bin/python2 -V
Python 2.7.12
➜ python -V
Python 2.7.12
➜ python -c 'import _ssl; print _ssl.OPENSSL_VERSION'
OpenSSL 1.0.2g 1 Mar 2016
➜ openssl version
OpenSSL 1.0.2g 1 Mar 2016
And I do have a file libssl.so.1.0.0
:
➜ ll /lib/x86_64-linux-gnu/libssl.so.1.0.0
-rw-r--r-- 1 root root 419K juni 20 14:32 /lib/x86_64-linux-gnu/libssl.so.1.0.0
I've installed these packages after suggestions from various stackoverflow threads: libssl1.0.0 libssl1.0.0:i386 openssl libssl-dev libudev-dev
. But I'm still seeing the same error. I've also tried to remove gcloud completely and reinstall it without avail.
Any tips to help figure this out would be very welcome. Thanks!
I was actually running into this on Google Cloud Shell but with OpenSSL 1.1. The error was something like gcloud failed to load libssl.so.1.1 and it was attempting to load from /tmp/
which seemed bizarre to me. I finally came across an answer (https://superuser.com/a/1411019/299738) that helped:
rm ~/.docker/config.json
I think I screwed things up when I was creating a virtualenv for an old version of Python (2.7).