1

I am trying install mysqlclient-python in docker with Debian 8
but when I run python3 setup.py install
I get error:

x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.4/_mysql.o -lmysqlclient -lpthread -lz -lm -ldl -lssl -lcrypto -o build/lib.linux-x86_64-3.4/_mysql.cpython-34m.so
/usr/bin/ld: cannot find -lssl
/usr/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I tryed install various packages (openssl, crypto++, libmysqlclient-dev, mysql-client,...) but nothing helped me..
Do you know what exactly I need?

1 Answer 1

1

You should install the libssl-dev package avallaible on the security repo , the following url should exist on your sources.list

deb http://security.debian.org/debian-security jessie/updates main 

or

deb http://security.debian.org/ jessie/updates main

Run :

apt-get update && apt-get install libssl-dev
apt-get install python3-dev libmysqlclient-dev
1
  • I'll add that build-essential is another library that can cause this when building a docker image Run: apt-get install build-essential Commented Jun 28, 2018 at 3:24

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.