RVM - can not install gem thrift on Ubuntu 11.10

…衆ロ難τιáo~ 提交于 2019-12-13 04:04:20

问题


I use Ubuntu 11.10 and ruby 1.9.2

I can not install thrift gem on my machine

$ 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

What went wrong and how to fix? All your support willbe highly appreciated. thanks!


回答1:


I found some references to this issue on an Apache forum. There is a patch file there that it looks like you can run in order to get the thrift gem to install. I checked it over and it looks sound.

You can find it here:

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



来源:https://stackoverflow.com/questions/7962715/rvm-can-not-install-gem-thrift-on-ubuntu-11-10

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!