Posts under category 文字
Error installing mysql-python/mysqlclient: library not found for -lssl
macOS Mojave 安装mysqlclient
时提示没有ssl库,错误如下:
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient ... error
Complete output from command /Users/moon/Workspace/Pycharm/env-tonghang/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/6z/3d8pkqg53r72hd3gvt71n0900000gn/T/pip-install-dk68k229/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 /private/var/folders/6z/3d8pkqg53r72hd3gvt71n0900000gn/T/pip-record-4eo9tbll/install-record.txt --single-version-externally-managed --compile --install-headers /Users/moon/Workspace/Pycharm/env-tonghang/include/site/python3.6/mysqlclient:
running install
running build
running build_py
creating build
creating build/lib.macosx-10.13-x86_64-3.6
copying _mysql_exceptions.py -> build/lib.macosx-10.13-x86_64-3.6
creating build/lib.macosx-10.13-x86_64-3.6/MySQLdb
copying MySQLdb/__init__.py -> build/lib.macosx-10.13-x86_64-3.6/MySQLdb
copying MySQLdb/compat.py -> build/lib.macosx-10.13-x86_64-3.6/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.13-x86_64-3.6/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.13-x86_64-3.6/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.13-x86_64-3.6/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.13-x86_64-3.6/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.13-x86_64-3.6/MySQLdb
creating build/lib.macosx-10.13-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.13-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.13-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.13-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.13-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.13-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.13-x86_64-3.6/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.macosx-10.13-x86_64-3.6/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.macosx-10.13-x86_64-3.6
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Dversion_info=(1,3,12,'final',0) -D__version__=1.3.12 -I/usr/local/opt/mysql@5.7/include/mysql -I/Users/moon/Workspace/Pycharm/env-tonghang/include -I/usr/local/Cellar/python/3.6.5_1/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c _mysql.c -o build/temp.macosx-10.13-x86_64-3.6/_mysql.o
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.13-x86_64-3.6/_mysql.o -L/usr/local/opt/mysql@5.7/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.13-x86_64-3.6/_mysql.cpython-36m-darwin.so
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
----------------------------------------
Command "/Users/moon/Workspace/Pycharm/env-tonghang/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/6z/3d8pkqg53r72hd3gvt71n0900000gn/T/pip-install-dk68k229/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 /private/var/folders/6z/3d8pkqg53r72hd3gvt71n0900000gn/T/pip-record-4eo9tbll/install-record.txt --single-version-externally-managed --compile --install-headers /Users/moon/Workspace/Pycharm/env-tonghang/include/site/python3.6/mysqlclient" failed with error code 1 in /private/var/folders/6z/3d8pkqg53r72hd3gvt71n0900000gn/T/pip-install-dk68k229/mysqlclient/
解决方法可以指定ssl库
LDFLAGS=-L/usr/local/opt/openssl/lib pip install mysqlclient
或在~/.bash_*中指定环境
export LDFLAGS="-L/usr/local/opt/openssl/lib"
To StackoverflowError installing mysql-python: library not found for -lssl
Unnamed document
食言、信口开河将会对两人的关系造成不可弥补的破坏,甚至也许是关系破裂的开始。
我希望永远不要再这样了,对自己爱的人。
宝贝生日快乐
陪宝贝度过的第一个生日
哭哭啼啼的度过了
宝贝为了让我好好睡觉,假装开心的陪我到这么晚,她应该还会去看一会儿小埋才肯去睡
宝贝情感洁癖严重,希望下辈子能让宝贝慢慢释怀
很爱你,宝贝,愿意跟你不离不弃
Unnamed document
不写标题直接提交会自动生成标题的很智能吧
2018-12-30
这一天,遇到了小洁
此内容被密码保护
I am sharing a super nice song for you.
Primavera - Ludovico Einaudi
about 6.7M network
此内容被密码保护
暂别上海
今天来收拾打扫办公室,被办公室其他团队抛弃的一盆小草让我犯难了,就是这个
我自己当时养的一棵盆栽已经送给了庆庆,这棵盆栽不是我养的但办公室另一个团队走了之后我就成了他的继父。
把它放到楼梯口又留了个纸条后回来继续打扫办公室发现它有一条小小的根已经扎到了地板缝里,突然感觉好……