我正在尝试设置我的应用程序,同时安装 mysql2 -v '0.5.3' 我收到此错误
Installing mysql2 0.5.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/vijaykumarbestha/.rvm/gems/ruby-2.7.2/gems/mysql2-0.5.3/ext/mysql2
/Users/vijaykumarbestha/.rvm/rubies/ruby-2.7.2/bin/ruby -I /Users/vijaykumarbestha/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0 -r ./siteconf20211111-51704-1tdbhjg.rb extconf.rb
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for rb_wait_for_single_fd()... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/vijaykumarbestha/.rvm/rubies/ruby-2.7.2/bin/$(RUBY_BASE_NAME)
--with-mysql-dir
--without-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-mysql-config
--without-mysql-config
--with-mysqlclient-dir
--without-mysqlclient-dir
--with-mysqlclient-include
--without-mysqlclient-include=${mysqlclient-dir}/include
--with-mysqlclient-lib
--without-mysqlclient-lib=${mysqlclient-dir}/lib
--with-mysqlclientlib
--without-mysqlclientlib
/Users/vijaykumarbestha/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/mkmf.rb:1050:in `block in find_library': undefined method `split' for nil:NilClass (NoMethodError)
from /Users/vijaykumarbestha/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/mkmf.rb:1050:in `collect'
from /Users/vijaykumarbestha/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/mkmf.rb:1050:in `find_library'
from extconf.rb:87:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/vijaykumarbestha/.rvm/gems/ruby-2.7.2/extensions/x86_64-darwin-19/2.7.0/mysql2-0.5.3/mkmf.log
extconf failed, exit code 1
我检查了我的 mkmf.log 文件并发现了这个错误
使用未声明的标识符“rb_wait_for_single_fd”
如何解决此错误?