LoginSignup
2
1

More than 5 years have passed since last update.

Mac(Mojave)でRails4.6系/ruby2.6系でmysql2をinstallしようとするとDon't know how to set rpath on your system... エラー

Last updated at Posted at 2019-02-26

背景

ローカルMac(Mojave)でRails4.6系/ruby2.6系でmysql2をbundle installしようとしたら以下のようなエラーでた

Building native extensions. This could take a while...
ERROR:  Error installing mysql2:
    ERROR: Failed to build gem native extension.
.
.
checking for rb_absint_singlebit_p()... yes
checking for rb_wait_for_single_fd()... yes
-----
Using mysql_config at /usr/local/bin/mysql_config
-----
.
.
-----
Don't know how to set rpath on your system, if MySQL libraries are not in path mysql2 may not load
-----
-----
Setting libpath to /usr/local/Cellar/mysql/5.7.20/lib
-----
.
.

やったこと

macOS_SDK_headers_for_macOS_10.14.pkgを起動する。以下のコマンドから飛べる。

open /Library/Developer/CommandLineTools/Packages/

参考: Updated to Mojave

だめだったこと

  • xcode-select --install だけでは解決しませんでした
  • あと bundle install 時、mysql2でエラー のまとめていただいているのは一通りためしてみました。上記のやりかたでだめだったら試してみてください。
2
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
2
1