23

我正在尝试在我的 Debian 机器上安装遏制 gem,但我很难使用本机扩展构建 gem。我正在使用 RVM。

只是我正在使用的东西的列表:

  • Debian
  • 打包机
  • 转速
  • 红宝石-1.9.2-p180
  • 抑制

我被告知我必须安装以下软件包并且我已经这样做了:

sudo apt-get install libcurl3 libcurl3-gnutls libcurl4-openssl-dev

当我继续这样做时:

宝石安装路边

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

    /usr/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb

checking for curl-config... yes checking for curlinfo_redirect_time... * 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/local/rvm/rubies/ruby-1.9.2-p180/bin/ruby --with-curl-dir --with-curl-include --without-curl-include=${curl-dir}/include --with-curl-lib --without-curl-lib=${curl-dir}/lib /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:368:in try_do': The complier failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:446:intry_compile' from extconf.rb:51:in block in have_constant' from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:693:inblock in checking_for' from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:280:in block (2 levels) in postpone' from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:254:inopen' from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:280:in block in postpone' from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:254:inopen' from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:276:in postpone' from /usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:692:inchecking_for' from extconf.rb:43:in have_constant' from extconf.rb:60:in'

我对此没有任何办法,有什么想法吗?

谢谢芽。

4

3 回答 3

56

在 Debian Squeeze 上,我已经设法安装curblibcurl4-openssl-dev之前安装的。

它也可能适用于libcurl4-gnutls-dev,但我没有测试过。

于 2011-08-24T10:24:02.310 回答
5

您可能需要安装 curl-devel 包。

百胜安装 curl-devel

于 2011-11-28T07:51:16.197 回答
1

openssl 曾经为我工作,但现在 libcurl4-gnutls-dev 对我有用......

于 2012-04-13T16:34:44.377 回答