【问题标题】:Kyoto Cabinet install via rubygems fails通过 ruby​​gems 安装京都内阁失败
【发布时间】:2013-07-22 20:52:37
【问题描述】:

我正在尝试通过 ruby​​ gem 安装京都内阁。我正在放入 Gemfile

gem "kyotocabinet", "~> 1.0"

相对于here 但是当我运行bundle 时它失败了

setting variables ...
$CFLAGS = -I. -I/usr/local/include -Wall $(cflags)  -fPIC -O2
$LDFLAGS = -L.  -rdynamic -Wl,-export-dynamic -L. -L/usr/local/lib
$libs =  -lkyotocabinet -lz -lstdc++ -lrt -lpthread -lm -lc
checking for kccommon.h... yes
creating Makefile

make
g++ -I. -I/home/gerry/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1/x86_64-linux -I/home/gerry/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1/ruby/backward -I/home/gerry/.rvm/rubies/ruby-1.9.2-p136/include/ruby-1.9.1 -I. -DHAVE_KCCOMMON_H    -fPIC -I. -I/usr/local/include -Wall -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC -O2   -o kyotocabinet.o -c kyotocabinet.cc
kyotocabinet.cc:29: error: ‘INT32_MAX’ was not declared in this scope
kyotocabinet.cc:30: error: ‘INT32_MAX’ was not declared in this scope
kyotocabinet.cc:61: warning: type qualifiers ignored on function return type
kyotocabinet.cc:320: warning: type qualifiers ignored on function return type
kyotocabinet.cc: In function ‘void init_err()’:
kyotocabinet.cc:387: error: ‘NOFILE’ is not a member of ‘kyotocabinet::BasicDB::Error’
kyotocabinet.cc: In function ‘VALUE db_increment(int, VALUE*, VALUE)’:
kyotocabinet.cc:1009: error: ‘INT64_MIN’ was not declared in this scope
kyotocabinet.cc: In function ‘VALUE db_synchronize(int, VALUE*, VALUE)’:
kyotocabinet.cc:1094: error: cannot declare variable ‘proc’ to be of abstract type ‘SoftFileProcessor’
kyotocabinet.cc:288: note:   because the following virtual functions are pure within ‘SoftFileProcessor’:
/usr/local/include/kcdb.h:1070: note:   virtual bool
kyotocabinet::BasicDB::FileProcessor::process(const std::string&, int64_t, int64_t)
make: *** [kyotocabinet.o] Error 1

如果有人知道绕过此错误的方法,请提供帮助!我正在使用 Ubuntu 10.10 仅供参考。

非常感谢您的帮助!

【问题讨论】:

    标签: ruby ruby-on-rails-3 rubygems kyotocabinet


    【解决方案1】:

    尝试改用 gem “kyotocabinet-ruby”。

    【讨论】:

    【解决方案2】:

    您需要安装libkyotocabinet-dev 包:

    sudo apt-get install libkyotocabinet-dev

    然后你可以使用kyotocabinet-ruby:

    sudo gem install kyotocabinet-ruby

    【讨论】:

    • 有没有办法在不依赖 debian 包的情况下做到这一点?头文件可以用其他方式安装吗?
    • 公平地说,我认为你不应该使用这个 gem,它不再维护了:最后一次更新在 2011 年 8 月(见rubygems.org/gems/kyotocabinet-ruby
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-29
    相关资源
    最近更新 更多