0

我正在尝试在 Ubuntu 上安装 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 版本。

4

1 回答 1

2

你至少需要 build-essential 包来编译原生扩展。还要确保你已经预编译了所有的 ruby​​ 基础库(或在 rvm 中)。

尝试安装 rvm 本身,它会在安装后为您提供所需软件包的列表。

于 2012-10-08T23:30:51.563 回答