首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装Curl,Curb Gem时出错?

安装Curl,Curb Gem时出错?
EN

Stack Overflow用户
提问于 2014-05-08 23:46:00
回答 1查看 1.9K关注 0票数 0

我试图在Ruby上安装Curb Gem,并得到了以下错误:

代码语言:javascript
复制
C:\Sites>gem install curb -- -- --with-curl-lib=C:\curl-7.34-devel-mingw32\bin -
-with-curl-include=C:\curl-7.34.0-devel-mingw32\include
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing curb:
    ERROR: Failed to build gem native extension.

    C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb -- --with-curl-lib=C
 :\curl-7.34-devel-mingw32\bin --with-curl-include=C:\curl-7.34.0-devel-mingw32\i
nclude
checking for curl-config... no
checking for main() in -lcurl... no
*** 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=C:/RailsInstaller/Ruby1.9.3/bin/ruby
    --with-curl-dir
    --without-curl-dir
    --with-curl-include=${curl-dir}/include
    --with-curl-lib=${curl-dir}/lib
    --with-curllib
    --without-curllib
extconf.rb:23:in `<main>':   Can't find libcurl or curl/curl.h (RuntimeError)

  Try passing --with-curl-dir or --with-curl-lib and --with-curl-include
  options to extconf.


Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
.1/gems/curb-0.8.5 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/curb-0.8.
5/ext/gem_make.out

C:\Sites>

我安装的一切都像别人说的那样,我真的很迷茫:(我真的想让它工作.我在windows 7 x64上,但是我的红宝石安装是32位的(我发现,由于某种原因,我只使用32位红宝石)。

现在我正在安装MinGW的东西--我甚至不知道在里面下载什么,我只是在基本安装中安装了所有的东西.

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-08-30 15:27:40

在Ubuntu上,我不得不跑:

代码语言:javascript
复制
sudo apt-get install build-essential libcurl4-openssl-dev

尝试安装这些库及其依赖项。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23554497

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档