2011-11-01 97 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