日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

MySQLClient instal error: “raise Exception(”Wrong MySQL configuration: maybe https://bugs.mysql.com/

發布時間:2023/12/20 数据库 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 MySQLClient instal error: “raise Exception(”Wrong MySQL configuration: maybe https://bugs.mysql.com/ 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
pip3 install mysql時出現下面問題:

ERROR: Command errored out with exit status 1:

?? ? command: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wz/n9gx1sqj3475nnqnvz4zzy9m0000gn/T/pip-install-vnx2mp28/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/wz/n9gx1sqj3475nnqnvz4zzy9m0000gn/T/pip-install-vnx2mp28/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info

?? ? ? ? cwd: /private/var/folders/wz/n9gx1sqj3475nnqnvz4zzy9m0000gn/T/pip-install-vnx2mp28/mysqlclient/

? ? Complete output (11 lines):

? ? Traceback (most recent call last):

? ? ? File "<string>", line 1, in <module>

? ? ? File "/private/var/folders/wz/n9gx1sqj3475nnqnvz4zzy9m0000gn/T/pip-install-vnx2mp28/mysqlclient/setup.py", line 16, in <module>

? ? ? ? metadata, options = get_config()

? ? ? File "/private/var/folders/wz/n9gx1sqj3475nnqnvz4zzy9m0000gn/T/pip-install-vnx2mp28/mysqlclient/setup_posix.py", line 63, in get_config

? ? ? ? libraries = [dequote(i[2:]) for i in libs if i.startswith('-l')]

? ? ? File "/private/var/folders/wz/n9gx1sqj3475nnqnvz4zzy9m0000gn/T/pip-install-vnx2mp28/mysqlclient/setup_posix.py", line 63, in <listcomp>

? ? ? ? libraries = [dequote(i[2:]) for i in libs if i.startswith('-l')]

? ? ? File "/private/var/folders/wz/n9gx1sqj3475nnqnvz4zzy9m0000gn/T/pip-install-vnx2mp28/mysqlclient/setup_posix.py", line 12, in dequote

? ? ? ? raise Exception("Wrong MySQL configuration: maybe https://bugs.mysql.com/bug.php?id=86971 ?")

? ? Exception: Wrong MySQL configuration: maybe https://bugs.mysql.com/bug.php?id=86971 ?

? ? ----------------------------------------

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output

?

解決方案:

# 修改前先備份
?
cp ?mysql_config mysql_config_backup
# 修改編輯權限
chmod 777 mysql_config
vi mysql_config
# 修改114行
> # Create options?
> libs="-L$pkglibdir"
> libs="$libs -l "
# 修改為
> # Create options?
> libs="-L$pkglibdir"
> libs="$libs -lmysqlclient -lssl -lcrypto"
?

然后:

新建:touch ~/.bash_profile

open ~/.bash_profile打開文件之后把下面貼在該文件末尾:

export PATH="/usr/local/opt/openssl/bin:$PATH" export LDFLAGS="-L/usr/local/opt/openssl/lib" export CPPFLAGS="-I/usr/local/opt/openssl/include"

然后保存,保存之后source ~/.bash_profile

然后再安裝 ?pip3 install mysqlclient就成功啦

總結

以上是生活随笔為你收集整理的MySQLClient instal error: “raise Exception(”Wrong MySQL configuration: maybe https://bugs.mysql.com/的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。