首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >我在安装thrift_client时出错

我在安装thrift_client时出错
EN

Stack Overflow用户
提问于 2011-12-08 01:34:15
回答 1查看 842关注 0票数 1

使用以下命令安装thrift_client时:

代码语言:javascript
复制
sudo gem install thrift_client -v '0.7.1'

我得到了这个错误:

代码语言:javascript
复制
Building native extensions.  This could take a while...
ERROR:  Error installing thrift_client:
    ERROR: Failed to build gem native extension.

/usr/bin/ruby1.9.1 extconf.rb
checking for strlcpy() in string.h... no
creating Makefile

make
gcc -I. -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64  -fPIC -g -O2 -Wall -Werror  -o protocol.o -c protocol.c
gcc -I. -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64  -fPIC -g -O2 -Wall -Werror  -o struct.o -c struct.c
struct.c:28:1: ошибка: static-декларация «strlcpy» после неstatic-декларации
/usr/include/ruby-1.9.1/ruby/missing.h:157:20: замечание: здесь была предыдущая декларация «strlcpy»
make: *** [struct.o] Ошибка 1

Gem files will remain installed in /var/lib/gems/1.9.1/gems/thrift-0.7.0 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/thrift-0.7.0/ext/gem_make.out

怎么了?

我使用Ubuntu 11.10,Thrift 0.8.0,Rails 3,Ruby 1.9.3

EN

回答 1

Stack Overflow用户

发布于 2012-01-15 15:33:36

Thrift_client还没有将其thrift gem依赖更新到0.8.0,也就是构建在ubuntu上的版本。所以他们说...Update thrift pull request

实际上,我是通过克隆一个修复分支并亲自构建和安装它来使其工作的:

代码语言:javascript
复制
git clone https://github.com/bitlove/thrift_client.git
cd thrift_client/
rake build
gem build thrift_client.gemspec
gem install thrift_client-0.7.2.gem
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8419819

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档