2011-11-01 100 views
0

安裝寶石節儉我使用Ubuntu 11.10和Ruby 1.9.2RVM - 無法在Ubuntu 11.10

我不能在我的機器

$ gem install thrift --no-ri --no-rdoc 
Building native extensions. This could take a while... 
ERROR: Error installing thrift: 
    ERROR: Failed to build gem native extension. 

     /home/sayuj/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb 
checking for strlcpy() in string.h... no 
creating Makefile 

make 
gcc -I. -I/home/sayuj/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/sayuj/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/sayuj/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -fPIC -g -O2 -Wall -Werror -o thrift_native.o -c thrift_native.c 
gcc -I. -I/home/sayuj/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/sayuj/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/sayuj/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -fPIC -g -O2 -Wall -Werror -o memory_buffer.o -c memory_buffer.c 
gcc -I. -I/home/sayuj/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-linux -I/home/sayuj/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/home/sayuj/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -fPIC -g -O2 -Wall -Werror -o struct.o -c struct.c 
struct.c:28:1: error: static declaration of ‘strlcpy’ follows non-static declaration 
/home/sayuj/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/missing.h:157:20: note: previous declaration of ‘strlcpy’ was here 
make: *** [struct.o] Error 1 


Gem files will remain installed in /home/sayuj/.rvm/gems/ruby-1.9.2-p290/gems/thrift-0.7.0 for inspection. 
Results logged to /home/sayuj/.rvm/gems/ruby-1.9.2-p290/gems/thrift-0.7.0/ext/gem_make.out 

出了什麼問題,以及如何解決上安裝節儉寶石?所有的支持將不勝感激。謝謝!

+0

我有這個問題,在這裏回答,抱歉複製: http://stackoverflow.com/questions/19649984/thrift-ruby-gem/ 19771815#19771815 –

回答

2

我在Apache論壇上發現了對這個問題的一些引用。在那裏有一個補丁文件,它看起來像你可以運行,以便安裝節儉寶石。我檢查了一下,看起來很合理。

你可以在這裏找到:

https://issues.apache.org/jira/browse/THRIFT-1382