當我運行 :
gem install mysql2 -- --with-mysql-lib=C:wamp64binmysqlmysql8。 0.21lib --with-mysql-include=C:wamp64binmysqlmysql8。 0.21include
我仍然得到錯誤:
ERROR: Error installing mysql2:
ERROR: 構建gem本地擴展失敗。
當前目錄。C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/mysql20.5.3/ext/mysql2
C:/Ruby30-x64/bin/ruby.exe -I C:/Ruby30-x64/lib/ruby/3.0.0 -r . /siteconf20210919-5108-35pas9。 rb extconf.rb --with-mysql-lib=C:wamp64inmysqlmysql8.0.21lib --with-mysql-include=C:wamp64inmysqlmysql8.0.21include
檢查for rb_absint_size()... yes
檢查 for rb_absint_singlebit_p() ... yes
檢查 for rb_wait_for_single_fd() ... yes
-----
使用 --with-mysql-dir=C:wamp64inmysqlmysql8.0.21。
-----
檢查for -lmysqlclient... yes
檢查 for mysql.h... yes
檢查for errmsg.h... yes。
檢查for SSL_MODE_DISABLED in mysql.h... yes
檢查for SSL_MODE_PREFERRED in mysql.h... yes
檢查for SSL_MODE_REQUIRED in mysql.h... yes
檢查for SSL_MODE_VERIFY_CA in mysql.h... yes
檢查for SSL_MODE_VERIFY_IDENTITY in mysql.h... yes
檢查 for MYSQL.net.vio in mysql.h... yes
檢查for MYSQL.net.pvio in mysql.h... no
檢查for MYSQL_ENABLE_CLEARTEXT_PLUGIN in mysql.h... yes
檢查for SERVER_QUERY_NO_GOOD_INDEX_USED in mysql.h... yes
檢查for SERVER_QUERY_NO_INDEX_USED in mysql.h... yes
檢查for SERVER_QUERY_WAS_SLOW in mysql.h... yes
檢查for MYSQL_OPTION_MULTI_STATEMENTS_ON in mysql.h... yes
檢查for MYSQL_OPTION_MULTI_STATEMENTS_OFF in mysql.h... yes
檢查 for my_bool in mysql.h. ...
而這還不是全部錯誤資訊的1%
我已經研究這個問題好幾天了,我不知道該怎么做。我正在認真考慮放棄 ruby 和 railsuj5u.com熱心網友回復:
試試這個https://github.com/brianmario/mysql2/issues/1005
的解決方案。特別是,$ bundle config --local build.mysql2 "-with-ldflags=-L/usr/local/opt/openssl/lib --with-cppflags=-I/usr/local/opt/openssl/include"
uj5u.com熱心網友回復:
我所要做的就是在ruby安裝目錄下運行msys2。生成我的pacman密鑰,并通過使用mysql連接器重新嘗試構建
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/322754.html
標籤:
下一篇:Ruby將整數分割成整數陣列
