繁体   English   中英

尝试捆绑安装时出现错误

[英]I get an error when trying to bundle install

gem install mysql2 -v '0.3.21' --source 'https://rubygems.org/'
Building native extensions. This could take a while...
ERROR:  Error installing mysql2:
ERROR: Failed to build gem native extension.
current directory: /home/tatarski/.rvm/gems/ruby-2.3.8/gems/mysql2-0.3.21/ext/mysql2
/usr/share/rvm/rubies/ruby-2.3.8/bin/ruby -I /usr/share/rvm/rubies/ruby-2.3.8/lib/ruby/site_ruby/2.3.0 -r ./siteconf20210223-17291-11rjqor.rb extconf.rb
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
-----
Using mysql_config at /usr/bin/mysql_config
-----
checking for mysql.h... yes
checking for errmsg.h... yes
checking for mysqld_error.h... yes
-----
Setting libpath to /usr/lib/x86_64-linux-gnu
-----
creating Makefile

current directory: /home/tatarski/.rvm/gems/ruby-2.3.8/gems/mysql2-0.3.21/ext/mysql2
make "DESTDIR=" clean

current directory: /home/tatarski/.rvm/gems/ruby-2.3.8/gems/mysql2-0.3.21/ext/mysql2
make "DESTDIR="
compiling client.c
client.c: In function 'nogvl_read_query_result':
client.c:439:3: error: unknown type name 'my_bool'
   my_bool res = mysql_read_query_result(client);
   ^
client.c: In function '_mysql_client_options':
client.c:762:3: error: unknown type name 'my_bool'
   my_bool boolval;
   ^
client.c:797:10: error: 'MYSQL_SECURE_AUTH' undeclared (first use in this function)
     case MYSQL_SECURE_AUTH:
          ^
client.c:797:10: note: each undeclared identifier is reported only once for each function it appears in
client.c: In function 'set_secure_auth':
client.c:1185:38: error: 'MYSQL_SECURE_AUTH' undeclared (first use in this function)
   return _mysql_client_options(self, MYSQL_SECURE_AUTH, value);
                                      ^
client.c:1186:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make: *** [Makefile:239: client.o] Error 1

make failed, exit code 2

这是我得到的全部错误。 有谁知道如何解决这一问题。 以前的线程是旧的/他们的解决方案不起作用。 我试过: sudo apt-get install ruby-mysql 并得到:阅读 package 列表...完成构建依赖树
正在读取 state 信息...完成 E:无法找到 package ruby-mysql

在此处输入图像描述

https://github.com/brianmario/mysql2如此处所述,在安装 gem 之前,您需要先安装一些 Linx 包

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM