mysql2:在系统升级后无法在/usr/local/Cellar/[email protected]/5.6.42/bin/mysql_config中找到mysql_config

问题描述 投票:0回答:1

我将Mac OS Mojave从v10.14.2升级到v10.14.0并运行

brew update
brew upgrade

此后,我开始在安装gem时看到以下错误:

    current directory: /Users/hirurg103/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.4/ext/mysql2
/Users/hirurg103/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20191218-70879-1yhhybm.rb extconf.rb
--with-mysql-config=/usr/local/Cellar/[email protected]/5.6.42/bin/mysql_config
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Cannot find mysql_config at /usr/local/Cellar/[email protected]/5.6.42/bin/mysql_config
-----

我查看了/usr/local/Cellar/[email protected]文件夹的内容,似乎其中没有5.6.42目录:

ls -l /usr/local/Cellar/[email protected]/

total 0
drwxr-xr-x  16 hirurg103  staff  512 Dec 18 13:50 5.6.46_2

我正在使用mysql2版本0.4.4

您是否有解决此问题的想法?谢谢!

mysql macos-mojave mysql2 mysql-5.6
1个回答
0
投票
我能够通过使用gem install mysql2 -v 0.4.4参数运行--with-mysql-config来解决此问题:

gem install mysql2 -v 0.4.4 -- --with-mysql-config=/usr/local/Cellar/[email protected]/5.6.46_2/bin/mysql_config

bundle install之后没有错误
© www.soinside.com 2019 - 2024. All rights reserved.