gpt4 book ai didi

ubuntu - 我安装 thrift_client 时出错

转载 作者:行者123 更新时间:2023-12-04 18:42:11 25 4
gpt4 key购买 nike

当我安装 thrift_client使用这个命令:

sudo gem install thrift_client -v '0.7.1'

我收到此错误:
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

最佳答案

Thrift_client 尚未将其 thrift gem 依赖项更新到 0.8.0,即基于 ubuntu 构建的版本。所以他们说... Update thrift pull request

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

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

关于ubuntu - 我安装 thrift_client 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8419819/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com