2

在 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

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

4

1 回答 1

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
于 2013-12-11T03:31:18.340 回答