ruby mysql 安装_mysql2 无法安装, ruby 1.9.3

环境:ruby 1.9.3, osx 10.8.1, xcode 4.4.1 CLTool, , mysql 5.5.27 dmg 安装 启动正常

gem install mysql2

Building native extensions. This could take a while...

ERROR: Error installing mysql2:

ERROR: Failed to build gem native extension.

/Users/sandy/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb

checking for rb_thread_blocking_region()... yes

checking for rb_wait_for_single_fd()... yes

checking for mysql.h... yes

checking for errmsg.h... yes

checking for mysqld_error.h... yes

creating Makefile

make

compiling client.c

In file included from client.c:1:

In file included from ./mysql2_ext.h:8:

In file included from /Users/sandy/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby.h:32:

/Users/sandy/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/ruby.h:105:37: error: 'ruby_check_sizeof_long' declared as an array with a negative size

typedef char ruby_check_sizeof_long[SIZEOF_LONG == sizeof(long) ? 1 : -1];

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/Users/sandy/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/x86_64-darwin12.0.0/ruby/config.h:24:21: note: expanded from macro 'SIZEOF_LONG'

#define SIZEOF_LONG 8

^

In file included from client.c:1:

In file included from ./mysql2_ext.h:8:

In file included from /Users/sandy/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby.h:32:

/Users/sandy/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/ruby.h:109:38: error: 'ruby_check_sizeof_voidp' declared as an array with a negative size

typedef char ruby_check_sizeof_voidp[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1];

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/Users/sandy/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/x86_64-darwin12.0.0/ruby/config.h:28:22: note: expanded from macro 'SIZEOF_VOIDP'

#define SIZEOF_VOIDP 8

^

In file included from client.c:1:

In file included from ./mysql2_ext.h:8:

In file included from /Users/sandy/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby.h:32:

In file included from /Users/sandy/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/ruby.h:1382:

In file included from /Users/sandy/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/intern.h:34:

/Users/sandy/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby/st.h:67:45: error: 'st_check_for_sizeof_st_index_t' declared as an array with a negative size

typedef char st_check_for_sizeof_st_index_t[SIZEOF_VOIDP == (int) sizeof(st_index_t) ? 1 : -1];

^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/Users/sandy/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/x86_64-darwin12.0.0/ruby/config.h:28:22: note: expanded from macro 'SIZEOF_VOIDP'

#define SIZEOF_VOIDP 8

^

3 errors generated.

make: *** [client.o] Error 1

Gem files will remain installed in /Users/sandy/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11 for inspection.

Results logged to /Users/sandy/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/gem_make.out

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值