2012-10-08 112 views
0

我想在Ubuntu上安裝augeas。不能在Ubuntu上安裝ruby-augeas

sudo gem install ruby-augeas 

這給我的錯誤:

Building native extensions. This could take a while... 
    ERROR: Error installing ruby-augeas: 
      ERROR: Failed to build gem native extension. 

      /usr/bin/ruby1.9.1 extconf.rb 
    *** extconf.rb failed *** 
    Could not create Makefile due to some reason, probably lack of 
    necessary libraries and/or headers. Check the mkmf.log file for more 
    details. You may need configuration options. 

    Provided configuration options: 
      --with-opt-dir 
      --without-opt-dir 
      --with-opt-include 
      --without-opt-include=${opt-dir}/include 
      --with-opt-lib 
      --without-opt-lib=${opt-dir}/lib 
      --with-make-prog 
      --without-make-prog 
      --srcdir=. 
      --curdir 
      --ruby=/usr/bin/ruby1.9.1 
      --with-augeas-config 
      --without-augeas-config 
      --with-pkg-config 
      --without-pkg-config 
    extconf.rb:27:in `<main>': augeas-devel not installed (RuntimeError) 

sudo apt-get install ruby1.8-dev ruby1.9.1-dev augeas-tools libaugeas-dev 

順便說一句,這裏是mkmf.log文件?

我該如何安裝augeas?我需要使用gem來安裝它,因爲這將用於Puppet的Ruby版本。

回答

2

您至少需要構建必備包來編譯本機擴展。還要確保你已經預編譯了所有的ruby庫文件(或者在rvm中)。

嘗試安裝rvm本身,它會給你一個安裝後需要的軟件包列表。