2017-08-04 118 views
1

我试图安装的mysql:错误而在MacOS塞拉利昂的Python安装的mysql 2.7

pip install mysqlclient 

我得到这个错误:

/usr/bin/clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g -I/usr/local/opt/lzlib/include -L/usr/local/opt/lzlib/lib -I/usr/local/opt/openssl/include build/temp.macosx-10.6-intel-2.7/_mysql.o -L/usr/local/mariadb/server/lib -lmariadb -lzlib -lpthread -ldl -lm -liconv -lgnutls -lnettle -ltasn1 -lgmp -lhogweed -o build/lib.macosx-10.6-intel-2.7/_mysql.so 
ld: library not found for -lzlib 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 
error: command '/usr/bin/clang' failed with exit status 1 

我已经安装了BREW库:

brew install lzlib 

但是错误依然存在。

开发工具安装,太:在mysql_config

$ xcode-select --install 
xcode-select: error: command line tools are already installed, use "Software Update" to install updates 
+0

尝试PIP 3,看看你是得到相同的错误 –

+0

'pip3'用于Python 3.x安装。 –

回答

0

有行像以下:

# Create options 
libs="-L$pkglibdir" 
libs="$libs -l" 

它应该是:

# Create options 
libs="-L$pkglibdir" 
libs="$libs -lmysqlclient -lssl -lcrypto"