2013-04-26 94 views
2

安裝郝德傑在Ubuntu中,12.10,當我運行下面的命令錯誤在Ubuntu

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 

任何人有任何想法可能是造成這個?

+0

有什麼有趣的生成日誌文件(從'結果記錄to'線在粘貼結束)?我想知道如果更早的'mkdir'或者什麼東西失敗了。檢查哪些路徑元素存在;從'/ home/luisramalho/.rvm/gems/ruby​​-2.0.0-p0/gems/json-1.6.8/ext/json/ext/json'開始,然後回到原來的位置,您可能會發現一些具體問題。也許現有的具有相同名稱的文件阻止了其中一個目錄的創建。 – 2013-04-26 13:07:40

+0

謝謝@JimStewart,日誌文件基本上顯示了與我在我的問題中發佈的控制檯相同的內容。我覺得奇怪的是,路徑是'json-1.6.8/ext/json/ext/json/ext',在我的機器上我只有'json-1.6.8/ext/json/ext'。而且,當我使用'ruby-1.9.3-p392 [x86_64]'時,我沒有任何問題的地方安裝caldecott時沒有這個問題。 – 2013-04-26 13:18:12

+1

我接近在caldecott工作的人。我不認爲caldecott或caldecott-client曾經打算與Ruby 2.0,FWIW兼容。如果它確實有效,那倒好運,而不是因爲任何專門針對Ruby 2.0兼容性的開發人員。 – 2013-04-26 14:22:27

回答

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