mysql - Cannot install ruby MySQL gem on windows
问题描述
When I run :
gem install mysql2 -- --with-mysql-lib=C:\wamp64\bin\mysql\mysql8.0.21\lib --with-mysql-include=C:\wamp64\bin\mysql\mysql8.0.21\include
I still get the error:
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/mysql2-0.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:\\wamp64\\bin\\mysql\\mysql8.0.21\\lib --with-mysql-include\=C:\\wamp64\\bin\\mysql\\mysql8.0.21\\include
checking for rb_absint_size()... yes
checking for rb_absint_singlebit_p()... yes
checking for rb_wait_for_single_fd()... yes
-----
Using --with-mysql-dir=C:\wamp64\bin\mysql\mysql8.0.21
-----
checking for -lmysqlclient... yes
checking for mysql.h... yes
checking for errmsg.h... yes
checking for SSL_MODE_DISABLED in mysql.h... yes
checking for SSL_MODE_PREFERRED in mysql.h... yes
checking for SSL_MODE_REQUIRED in mysql.h... yes
checking for SSL_MODE_VERIFY_CA in mysql.h... yes
checking for SSL_MODE_VERIFY_IDENTITY in mysql.h... yes
checking for MYSQL.net.vio in mysql.h... yes
checking for MYSQL.net.pvio in mysql.h... no
checking for MYSQL_ENABLE_CLEARTEXT_PLUGIN in mysql.h... yes
checking for SERVER_QUERY_NO_GOOD_INDEX_USED in mysql.h... yes
checking for SERVER_QUERY_NO_INDEX_USED in mysql.h... yes
checking for SERVER_QUERY_WAS_SLOW in mysql.h... yes
checking for MYSQL_OPTION_MULTI_STATEMENTS_ON in mysql.h... yes
checking for MYSQL_OPTION_MULTI_STATEMENTS_OFF in mysql.h... yes
checking for my_bool in mysql.h...
And this isn't even 1% of the total error message
I've been on this for days and I have no idea what to do. I'm seriously considering dropping ruby and rails
解决方案
我所要做的就是从 ruby 安装目录运行 msys2。生成我的 pacman 密钥并使用 mysql 连接器重试构建
推荐阅读
- nginx - Apollo graphql 和 Nginx 的空响应
- .net-core - 如何在 .net 核心控制台应用程序上显示消息框?
- python - 手动加载的模块没有所有属性
- python - 从列表中获取链接和抓取表
- r - 从另一个因素添加一个因素
- java - 在 springdoc-openapi-ui 中为基本身份验证启用授权按钮
- java - Android RecyclerView 比较数据并根据它更新ui
- python - 如何在不失去焦点的情况下发送键输入?
- ios - XCUITest:如何跳转到应用程序代码?如何修改被测应用的状态?
- android - 应用程序包语言拆分似乎无法处理区域