Python: error while loading shared libraries: libssl.so.0.9.8

software development

#1

I installed a small Python Flask app yesterday and it was working fine.
This morning I get:
/home/jhubele/[mydomain].com/bin/python: error while loading shared libraries: libssl.so.0.9.8: cannot open shared object file: No such file or directory.

Error ID
673fdf06

I assume this is related to the Ubuntu upgrade.


#2

It appears that it’s now using a newer version of libssl:

$ ls /lib/x86_64-linux-gnu/ | grep ssl libssl.so.1.0.0

If you have a python virtual environment created pre-upgrade it will be using the older version (0.9.8). I was able to fix it by creating a new virtual environment and re-installing the packages. There might be an easier way to upgrade, not too experienced with virtualenv.

[cucumbertree]$ source venv/bin/activate (venv)[cucumbertree]$ python --version python: error while loading shared libraries: libssl.so.0.9.8: cannot open shared object file: No such file or directory (venv)[cucumbertree]$ deactivate [cucumbertree]$ mv venv venv_bak [cucumbertree]$ virtualenv venv New python executable in venv/bin/python Installing distribute.............................................................................................................................................................................................done. Installing pip...............done. [cucumbertree]$ source venv/bin/activate (venv)[cucumbertree]$ python --version Python 2.7.3

Also note that Python was upgraded from 2.6 to 2.7.