DK Devesh
DK Devesh

Reputation: 27

Not able to install mysqlclient

I am new to django but I know MySQL. However I wanted to connect django with mysql but is stuck at this point where I have to install mysqlclient but getting the error. I have already installed mysql server, created a virtualenv but still not able to install mysqlclient.

Here is the error I am getting:

/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

----------------------------------------

Command "/home/devesh/django-apps/myproject/myprojectenv/bin/python3 -u -c "import setuptools, tokenize;file='/tmp/pip-install-vaq3j43s/mysqlclient/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-v5qqxse5/install-record.txt --single-version-externally-managed --compile --install-headers /home/devesh/django-apps/myproject/myprojectenv/include/site/python3.5/mysqlclient" failed with error code 1 in /tmp/pip-install-vaq3j43s/mysqlclient/

Upvotes: 0

Views: 1567

Answers (1)

Usman Maqbool
Usman Maqbool

Reputation: 3371

You need to install packages

sudo apt-get install libpq-dev python-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libffi-dev

Upvotes: 4

Related Questions