当前位置:网站首页>Phthon3 install mysqldb error problem solving reason: image not found

Phthon3 install mysqldb error problem solving reason: image not found

2022-07-19 04:30:00 Mr. Xiangzai

This kind of information :

Library not loaded: libssl.1.1.dylib

packages/MySQLdb/_mysql.cpython-38-darwin.so
Reason: image not found

The error information is as follows :

ImportError: dlopen(/Users/XXXX/ Work related /CODE====Edit/cph_api_service/venv/lib/python3.8/site-packages/MySQLdb/_mysql.cpython-38-darwin.so, 2): Library not loaded: libssl.1.1.dylib
  Referenced from: /Users/XXXX/ Work related /CODE====Edit/cph_api_service/venv/lib/python3.8/site-packages/MySQLdb/_mysql.cpython-38-darwin.so
  Reason: image not found

The above exception was the direct cause of the following exception:

Traceback (most recent call last):

terms of settlement

First of all, this machine needs to be installed mysql

*  lib git:(master) * pwd
/usr/local/mysql/lib
*  lib git:(master) * ls
libcrypto.1.1.dylib          libmysqlclient.dylib         libprotobuf.3.6.1.dylib      mecab
libcrypto.dylib              libmysqlservices.a           libprotobuf.dylib            pkgconfig
libmysqlclient.21.dylib      libprotobuf-lite.3.6.1.dylib libssl.1.1.dylib             plugin
libmysqlclient.a             libprotobuf-lite.dylib       libssl.dylib

then cd /usr/local/lib Below directory

sudo ln -s /usr/local/mysql/lib/libmysqlclient.21.dylib /usr/local/lib/libmysqlclient.21.dylib

sudo ln -s /usr/local/mysql/lib/libssl.1.1.dylib /usr/local/lib/libssl.1.1.dylib

sudo ln -s /usr/local/mysql/lib/libcrypto.1.1.dylib /usr/local/lib/libcrypto.1.1.dylib

What is missing in error reporting Just add any mapping Then it's all right

原网站

版权声明
本文为[Mr. Xiangzai]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/200/202207170005237065.html

随机推荐