4

ruby 2.0.0-p0にvagrantgemをインストールしようとすると、次のエラーが発生します。

~ ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux]
~ gem -v
2.0.0.rc.2
~ gem list json
*** LOCAL GEMS ***
json (1.7.7)

~ gem install vagrant
Building native extensions.  This could take a while...
ERROR:  Error installing vagrant:
    ERROR: Failed to build gem native extension.

    /home/user_name/.rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb
checking for ruby/re.h... yes
checking for ruby/encoding.h... yes
creating Makefile
make
compiling generator.c
generator.c: In function ‘cState_aref’:
generator.c:736:5: warning: variable ‘state’ set but not used [-Wunused-but-set-variable]
linking shared-object json/ext/generator.so
make install
/usr/bin/install -c -m 0755 generator.so /home/user_name/.rvm/gems/ruby-2.0.0-p0/gems/json-1.5.5/ext/json/ext/json/ext
/usr/bin/install: cannot create regular file `/home/user_name/.rvm/gems/ruby-2.0.0-p0/gems/json-1.5.5/ext/json/ext/json/ext': No such file or directory
make: *** [install-so] Error 1
Gem files will remain installed in /home/user_name/.rvm/gems/ruby-2.0.0-p0/gems/json-1.5.5 for inspection.
Results logged to /home/user_name/.rvm/gems/ruby-2.0.0-p0/gems/json-1.5.5/ext/json/ext/generator/gem_make.out

私は、gemをビルドして上記のエラーを取得しているときに、/ home / user_name / .rvm / gems / ruby​​-2.0.0-p0 /gems/からjson-1.5.5を使用していると考えています。

最新のjson-1.7.7gemを再インストールしようとしましたが、それでもインストールに失敗します。

4

1 に答える 1

7

次のコマンドでRubygemsを更新します。gem update --system

この問題を修正したコミットは次のとおりです:https ://github.com/rubygems/rubygems/commit/1ca11d00833bbca33215ff581303d1fee8f2d1ef

于 2013-03-13T21:21:26.217 に答える