-
Notifications
You must be signed in to change notification settings - Fork 441
import MySQLdb fails with undefined symbol: SSL_get_error #379
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
Comments
Undefined symbols are normal. They are provided by dynamically linked libraries. |
command output:
|
|
Assuming removing the pip cache is the option
Gist Link: https://gist.github.com/EarthenSky/464e6a309c058935e1e97d1890eb3db2 |
You still can not import mysqlclient doesn't link ssl, but libmaria.a does. You need to install OpenSSL libraries. |
Yes, I still can't import Thanks for your help. |
Managed to fix the error, it was with with mariadb. Originally I foolishly followed this advice which fixes the install error I had: To fix my error I undid the previous change I had made, then followed the following response to install mysql-devel instead of mariadb-devel: Closing this. |
If you are running Ubuntu/Debian, the correct solution is to install |
@methane removed ssl libraries in #409. mysql-8.0.22 (tarball) still includes ssl in $ find mysq* -name mysql_config -print -exec {} --libs \; mysql-5.6.49/bin/mysql_config -L/usr/local/mysql-5.6.49/lib -lmysqlclient -lpthread -lm -lrt -ldl mysql-5.7.31/bin/mysql_config -L/usr/local/mysql-5.7.31/lib -lmysqlclient -lpthread -lm -lrt -ldl mysql-8.0.21/bin/mysql_config -L/usr/local/mysql-8.0.21/lib -Wl,-R,/usr/local/mysql-8.0.21/lib -L/usr/local/mysql-8.0.21/lib/private -Wl,-R,/usr/local/mysql-8.0.21/lib/private -lmysqlclient -lpthread -lm -lrt -lcrypto -lssl -ldl mysql-8.0.22-linux-glibc2.12-x86_64/bin/mysql_config -L/usr/local/mysql-8.0.22-linux-glibc2.12-x86_64/lib -Wl,-R,/usr/local/mysql-8.0.22-linux-glibc2.12-x86_64/lib -L/usr/local/mysql-8.0.22-linux-glibc2.12-x86_64/lib/private -Wl,-R,/usr/local/mysql-8.0.22-linux-glibc2.12-x86_64/lib/private -lmysqlclient -lpthread -lm -lrt -lcrypto -lssl -ldl -lresolv mariadb connector -c added (early 2016, expand Is Alternately using $ find /usr/local/mysql-* -name \*pc -print -printf "libs:\n" -exec pkg-config --libs {} \; -printf "\nAnd --libs --static:\n" -exec pkg-config --libs --static {} \; /usr/local/mysql-5.7.31/lib/pkgconfig/mysqlclient.pc libs: -L/usr/local/mysql/lib -lmysqlclient And --libs --static: -L/usr/local/mysql/lib -lmysqlclient -lpthread -lm -lrt -ldl /usr/local/mysql-8.0.21/lib/pkgconfig/mysqlclient.pc libs: -L/usr/local/mysql/lib -Wl,-R,/usr/local/mysql/lib -L/usr/local/mysql/lib/private -Wl,-R,/usr/local/mysql/lib/private -lmysqlclient And --libs --static: -L/usr/local/mysql/lib -Wl,-R,/usr/local/mysql/lib -L/usr/local/mysql/lib/private -Wl,-R,/usr/local/mysql/lib/private -lmysqlclient -lpthread -lm -lrt -lcrypto -lssl -ldl /usr/local/mysql-8.0.22-linux-glibc2.12-x86_64/lib/pkgconfig/mysqlclient.pc libs: -L/usr/local/mysql/lib -Wl,-R,/usr/local/mysql/lib -L/usr/local/mysql/lib/private -Wl,-R,/usr/local/mysql/lib/private -lmysqlclient And --libs --static: -L/usr/local/mysql/lib -Wl,-R,/usr/local/mysql/lib -L/usr/local/mysql/lib/private -Wl,-R,/usr/local/mysql/lib/private -lmysqlclient -lpthread -lm -lrt -lcrypto -lssl -ldl -lresolv $ pkg-config --libs --static ./mariadb_config/libmariadb.pc -L/usr/local/lib/mariadb/ -lmariadb -ldl -lm -lpthread -lssl -lcrypto $ pkg-config --libs ./mariadb_config/libmariadb.pc -L/usr/local/lib/mariadb/ -lmariadb |
Found this error while using django but managed to isolate it to mysqlclient.
After installing mysqlclient using pip it throws the following error:
I inspected the file
_mysql.cpython-37m-x86_64-linux-gnu.so
using nm and it seems to have a lot of undefined symbols. Compilation error?mysqlclient version 1.4.2.post1
Centos 7
Mariadb 10.4.7
The text was updated successfully, but these errors were encountered: