LoginSignup
7
0

More than 3 years have passed since last update.

mysql_config not foundとでたときの対処法

Posted at

M1Macを買って色々とセットアップしてたらエラーがでたので。

pipでmysqlclientをインストールしようとしたらmysql_config not foundとでる。

やること

brew install mysql-connector-c

インストールできたら、

echo 'export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH"' >> ~/.zshrc
export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH"
which mysql_config

でパスを通して、whichが叩けることを確認。

chmod 777 /opt/homebrew/opt/mysql-client/bin/mysql_config

でパーミッションを変更。(パスはwhichを叩いたときにでてくるパスとなる)

vi で開いて。

libs="$libs -lmysqlclient"

libs="$libs -lmysqlclient -lssl -lcrypto"

に変える。

それで保存してもう一回mysqlclientを入れるpip installコマンドを叩けば無事にインストールできる。

幸せいっぱいですね。

7
0
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
7
0