0
1

More than 3 years have passed since last update.

【エラー】Django開発で、ローカルにmysqlclientをインストールできなかったエラー

Last updated at Posted at 2019-11-16
ターミナル
$ pip3 install mysqlclient

    ERROR: Command errored out with exit status 1:
     command: /Users/yuya/.pyenv/versions/3.8.0/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] 

一部しか載せてないけど、画面が真っ赤になるレベルでエラーを吐かれた。

対処法

ターミナル
$ sudo vim /usr/local/bin/mysql_config 

下記のように変更する

ターミナル
# Create options 
libs="-L$pkglibdir"
libs="$libs -l "

↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

# Create options 
libs="-L$pkglibdir"
libs="$libs -lmysqlclient"   ← ここ!

下記のコマンドで表示されたPATHを.bash_profileに追加して、更新する。

ターミナル
$ brew info openssl

これでもう一度インストールすると完了できました!

参考

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1