RVM - 无法在 Ubuntu 11.10 上安装 gem thrift

发布于 2024-12-12 17:36:47 字数 1746 浏览 5 评论 0原文

我使用 Ubuntu 11.10 和 ruby​​ 1.9.2

我无法在我的机器上安装 thrift gem

$ 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

出了什么问题以及如何修复?我们将非常感谢您的所有支持。谢谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

抱猫软卧 2024-12-19 17:36:47

我在 Apache 论坛上找到了一些对此问题的参考。那里有一个补丁文件,看起来您可以运行它来安装 thrift gem。我检查了一下,看起来不错。

您可以在这里找到它:

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

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文