在Ubuntu上安装caldecott时出错

时间:2013-04-26 11:06:25

标签: ruby ubuntu rvm

在Ubuntu 12.10中运行以下命令时

gem install caldecott

我收到以下错误消息

Building native extensions.  This could take a while...

ERROR:  Error installing caldecott:
    ERROR: Failed to build gem native extension.

    /home/luisramalho/.rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb
creating Makefile

make
compiling generator.c
generator.c: In function ‘cState_aref’:
generator.c:632:5: warning: variable ‘state’ set but not used [-Wunused-but-set-variable]
generator.c: In function ‘isArrayOrObject’:
generator.c:867:5: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
linking shared-object json/ext/generator.so

make install
/usr/bin/install -c -m 0755 generator.so /home/luisramalho/.rvm/gems/ruby-2.0.0-p0/gems/json-1.6.8/ext/json/ext/json/ext
/usr/bin/install: cannot create regular file `/home/luisramalho/.rvm/gems/ruby-2.0.0-p0/gems/json-1.6.8/ext/json/ext/json/ext': No such file or directory
make: *** [install-so] Error 1


Gem files will remain installed in /home/luisramalho/.rvm/gems/ruby-2.0.0-p0/gems/json-1.6.8 for inspection.
Results logged to /home/luisramalho/.rvm/gems/ruby-2.0.0-p0/gems/json-1.6.8/ext/json/ext/generator/gem_make.out

任何人都知道可能导致这种情况的原因是什么?

1 个答案:

答案 0 :(得分:0)

为了让下一个人更容易在这里使用用户评论解决(https://github.com/appfog/af/issues/27#issuecomment-19190069):

$ rvm install ruby-1.9.3-p484
$ rvm use 1.9.3
$ gem install af
[...]
$ gem install caldecott
[... long list of dependencies being installed which didn't happen for Ruby 2.0]
$ af login
$ af tunnel