0

我收到以下错误,基本上是试图让路边走,但不会。这是我的终端的快照:

gem install curb -- -with-curl-lib=c:/curl-7.33.0/lib
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.33.0/lib
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
    --without-curl-include=${curl-dir}/include
    --with-curl-lib
    --without-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:\work\gundable>gem install curb -- --with-curl-lib=c:/curl-7.33.0/lib --with-curl-include-c:/curl-7.33.0/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.33.0/lib --with-curl-include-c:/curl-7.33.0/
include
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
    --without-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
4

1 回答 1

0

正如在https://stackoverflow.com/a/20374291中回答的那样,您需要安装 libcurl3-dev

sudo apt-get install libcurl3-dev
于 2014-03-04T17:34:05.637 回答