2013-10-25 5 views
2

수많은 시도 끝에 OSX Mavericks (Ruby 2.0과 함께 제공됨)에서 rbenv를 사용하여 Ruby 1.8.7을 설치했습니다.설치 - rbenv와 Ruby 1.8.7을 사용하여 OSX Mavericks에서 mysql2 gem이 실패 함

그러나 나를 이해하기가 매우 어려운 mysql2를 설치할 때 오류가 발생합니다. 누군가가 이것을 해결하기위한 방향으로 나를 가리킬 수 있습니까? - --with-CFLAGS = \ "- DHAVE_UINT \"을

보석 mysql2를 설치

자료 : 잘 작동하는이 발견 그냥 지금

$ sudo gem install mysql2 
Building native extensions. This could take a while... 
ERROR: Error installing mysql2: 
    ERROR: Failed to build gem native extension. 

     /Users/myuser/.rbenv/versions/1.8.7-p370/bin/ruby extconf.rb 
checking for rb_thread_blocking_region()... no 
checking for rb_wait_for_single_fd()... no 
checking for rb_hash_dup()... no 
checking for rb_intern3()... no 
checking for mysql.h... yes 
checking for errmsg.h... yes 
checking for mysqld_error.h... yes 
creating Makefile 

make 
/usr/local/bin/gcc-4.2 -I. -I. -I/Users/myuser/.rbenv/versions/1.8.7-p370/lib/ruby/1.8/i686-darwin13.0.0 -I. -DHAVE_MYSQL_H -DHAVE_ERRMSG_H -DHAVE_MYSQLD_ERROR_H -I'/Users/myuser/.rbenv/versions/1.8.7-p370/include' -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I'/Users/myuser/.rbenv/versions/1.8.7-p370/include' -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include -I/usr/local/mysql/include -Os -g -fno-strict-aliasing -arch x86_64 -fno-common -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/lib -O3 -Wno-error=shorten-64-to-32 -pipe -fno-common -Wall -funroll-loops -c client.c 
In file included from client.c:1: 
./mysql2_ext.h:13: error: redefinition of typedef ‘ushort’ 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/sys/types.h:91: error: previous declaration of ‘ushort’ was here 
./mysql2_ext.h:14: error: redefinition of typedef ‘uint’ 
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/sys/types.h:92: error: previous declaration of ‘uint’ was here 
client.c: In function ‘set_charset_name’: 
client.c:1045: warning: unused variable ‘mysql2rb’ 
make: *** [client.o] Error 1 


Gem files will remain installed in /Users/myuser/.rbenv/versions/1.8.7-p370/lib/ruby/gems/1.8/gems/mysql2-0.3.13 for inspection. 
Results logged to /Users/myuser/.rbenv/versions/1.8.7-p370/lib/ruby/gems/1.8/gems/mysql2-0.3.13/ext/mysql2/gem_make.out 

답변