LoginSignup
0
0

More than 5 years have passed since last update.

[mac] bundle installでmysql2のインストールが失敗する

Posted at

問題

bundle install時にMysql2の箇所でエラーが発生した。

/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/mysql2-0.5.2/gem_make.out
checking for my_bool in mysql.h... yes
-----
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/opt/mysql@5.7/lib
-----
creating Makefile

current directory: /path/vendor/bundle/ruby/2.5.0/gems/mysql2-0.5.2/ext/mysql2
make "DESTDIR=" clean

current directory: /path/vendor/bundle/ruby/2.5.0/gems/mysql2-0.5.2/ext/mysql2
make "DESTDIR="
compiling client.c
compiling infile.c
compiling mysql2_ext.c
compiling result.c
compiling statement.c
linking shared-object mysql2/mysql2.bundle
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [mysql2.bundle] Error 1

make failed, exit code 2

解決策

xcodeをアップデートして、再実行で解決しました。

$ xcode-select --install
$ bundle install --path vendor/bundle
0
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
0
0