I have met a problem on mysqlclient 1.3.10 after installing libssl1.1
import MySQLdb
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 19, in <module>
import _mysql
ImportError: /usr/local/lib/python2.7/dist-packages/_mysql.so: undefined symbol: OPENSSL_add_all_algorithms_noconf
Reproduce steps:
- On a ubuntu 14.04 machine
Python 2.7.6
- echo 'deb http://archive.mariadb.org/mariadb-10.0.29/repo/ubuntu/ trusty main' > /etc/apt/sources.list.d/mariadb.list
- apt-get -f install --yes --allow-unauthenticated mariadb-server
- Login as root and show default databases successfully
- add-apt-repository ppa:ondrej/php
- apt-get update
- apt-get install libssl-dev(version:1.1.0f-2~ubuntu14.04.1+deb.sury.org+1)
- pip install mysqlclient
- python -c "import MySQLdb"