I am trying to install the following package on my mac in order to test my API on my local environment but thus far I have not succeeded.
//github.com/spachev/mysql_udf_bundle
I have tried various things such as:
brew install libmysqlclient-dev
This produced the following error:
Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
I am used to working on CentOS so am not particularly familiar with the likes of apt
and brew
... Can anyone advise me on how best to install this on my Mac?
Not sure if it is of any relevance but I am running Mac OSX 10.11.4 [El Capitan].
I did NOT install MySQL using brew install mysql
, instead, I followed the instructions here: //jason.pureconcepts.net/2015/10/install-apache-php-mysql-mac-os-x-el-capitan/NOT install MySQL using brew install mysql
, instead, I followed the instructions here: //jason.pureconcepts.net/2015/10/install-apache-php-mysql-mac-os-x-el-capitan/
7 hữu ích 2 bình luận chia sẻ
- Cài đặt mysql bằng cách sử dụng brew và thêm nó vào đường dẫn:
- 3 hữu ích 0 bình luận chia sẻ
- Đăng nhập để trả lời câu hỏi
Có thể bạn quan tâm
Collecting mysqlclient
Using cached mysqlclient-1.3.10.tar.gz
Complete output from command python setup.py egg_info:
Traceback [most recent call last]:
File "", line 1, in
File "/private/var/folders/y_/c31n_1v12v169zfv829p_v_80000gn/T/pip-build-f51KhW/mysqlclient/setup.py", line 17, in
metadata, options = get_config[]
File "setup_posix.py", line 54, in get_config
libraries = [dequote[i[2:]] for i in libs if i.startswith['-l']]
File "setup_posix.py", line 12, in dequote
if s[0] in "\"'" and s[0] == s[-1]:
IndexError: string index out of range
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/y_/c31n_1v12v169zfv829p_v_80000gn/T/pip-build-f51KhW/mysqlclient/
- Tôi đã cài đặt rồi
- Python 2.7.13
- Django 1.11
- MySQL 5.7.17
Tôi muốn sử dụng MySQL với Django, nhưng sau khi cài đặt trình kết nối mysql, tôi đã cố gắng cài đặt mysqlclient cho Python
0, nhưng tôi gặp sự cố này: 1 bình luận 33k xem chia sẻ Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
answer
48
python
brew install mysql-client
# mysql-client is not on the `PATH` by default
export PATH="/usr/local/opt/mysql-client/bin:$PATH"
# openssl is not on the link path by default
export LIBRARY_PATH="$LIBRARY_PATH:/usr/local/opt/openssl/lib/"
mysql
django 0 bình luận chia sẻ
answer
21
macos
1.
4Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
42.
3Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
321 hữu ích 1 bình luận 33k xem chia sẻ
Tôi cần những thứ sau để xây dựng / cài đặt
Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
1
1.brew install mysql
2.
Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
3Sau đó, tôi có thể
Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
2/ Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
3thành công21 hữu ích 1 bình luận chia sẻ 1 bình luận chia sẻ
answer
12
Cài đặt
Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
8thay vì cài đặt Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
9nếu bạn không định có Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
9trong máy tính của mìnhCollecting mysqlclient
Using cached mysqlclient-1.3.10.tar.gz
Complete output from command python setup.py egg_info:
Traceback [most recent call last]:
File "", line 1, in
File "/private/var/folders/y_/c31n_1v12v169zfv829p_v_80000gn/T/pip-build-f51KhW/mysqlclient/setup.py", line 17, in
metadata, options = get_config[]
File "setup_posix.py", line 54, in get_config
libraries = [dequote[i[2:]] for i in libs if i.startswith['-l']]
File "setup_posix.py", line 12, in dequote
if s[0] in "\"'" and s[0] == s[-1]:
IndexError: string index out of range
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/y_/c31n_1v12v169zfv829p_v_80000gn/T/pip-build-f51KhW/mysqlclient/
1Collecting mysqlclient
Using cached mysqlclient-1.3.10.tar.gz
Complete output from command python setup.py egg_info:
Traceback [most recent call last]:
File "", line 1, in
File "/private/var/folders/y_/c31n_1v12v169zfv829p_v_80000gn/T/pip-build-f51KhW/mysqlclient/setup.py", line 17, in
metadata, options = get_config[]
File "setup_posix.py", line 54, in get_config
libraries = [dequote[i[2:]] for i in libs if i.startswith['-l']]
File "setup_posix.py", line 12, in dequote
if s[0] in "\"'" and s[0] == s[-1]:
IndexError: string index out of range
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/y_/c31n_1v12v169zfv829p_v_80000gn/T/pip-build-f51KhW/mysqlclient/
2Collecting mysqlclient
Using cached mysqlclient-1.3.10.tar.gz
Complete output from command python setup.py egg_info:
Traceback [most recent call last]:
File "", line 1, in
File "/private/var/folders/y_/c31n_1v12v169zfv829p_v_80000gn/T/pip-build-f51KhW/mysqlclient/setup.py", line 17, in
metadata, options = get_config[]
File "setup_posix.py", line 54, in get_config
libraries = [dequote[i[2:]] for i in libs if i.startswith['-l']]
File "setup_posix.py", line 12, in dequote
if s[0] in "\"'" and s[0] == s[-1]:
IndexError: string index out of range
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/y_/c31n_1v12v169zfv829p_v_80000gn/T/pip-build-f51KhW/mysqlclient/
3Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
3xuất LDFLAGS = "- L / usr / local / opt / openssl / lib"
xuất CPPFLAGS = "- I / usr / local / opt / openssl / include"
12 hữu ích 2 bình luận chia sẻ 2 bình luận chia sẻ
answer
11
brew install/upgrade/reinstall mysql
brew install mysql-client
export PATH="/usr/local/opt/openssl/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
pip install mysqlclient
works perfectly
Cài đặt
8thay vì cài đặt Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
9nếu bạn không định có Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
9trong máy tính của mình 3 bình luận chia sẻ Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
answer
7
Cài đặt
Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
8thay vì cài đặt Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
9nếu bạn không định có Error: No available formula with the name "libmysqlclient-dev"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.
9trong máy tính của mìnhxuất LDFLAGS = "- L / usr / local / opt / openssl / lib"
$ brew install mysql
$ export PATH=$PATH:/Applications/MySQLWorkbench.app/Contents/MacOS
$ xcode-select --install
$ pip install mysqlclient
xuất CPPFLAGS = "- I / usr / local / opt / openssl / include" 2 bình luận chia sẻ
answer
3
12 hữu ích 2 bình luận chia sẻ
$ brew install mysql
$ export PATH=/usr/local/mysql/bin:$PATH
$ sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/local/lib/libmysqlclient.18.dylib
$ pip install mysqlclient
11 hữu ích 3 bình luận chia sẻ 0 bình luận chia sẻ