我已经设置了一个rails应用程序但是当我进行捆绑安装时出现错误:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /home/kelvin/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb 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=/home/kelvin/.rvm/rubies/ruby-2.1.1/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:18:in `': 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. extconf failed, exit code 1 Gem files will remain installed in /home/kelvin/.rvm/gems/ruby-2.1.1/gems/curb-0.8.5 for inspection. Results logged to /home/kelvin/.rvm/gems/ruby-2.1.1/extensions/x86-linux/2.1.0/curb-0.8.5/gem_make.out An error occurred while installing curb (0.8.5), and Bundler cannot continue.
gem install curb -v '0.8.5'
在捆绑之前确保成功.
所以我做了
gem install curb -v '0.8.5
但我一直收到这个错误:
ERROR: Error installing curb: ERROR: Failed to build gem native extension. /home/kelvin/.rvm/rubies/ruby-2.1.1/bin/ruby extconf.rb 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=/home/kelvin/.rvm/rubies/ruby-2.1.1/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:18:in `': 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. extconf failed, exit code 1 Gem files will remain installed in /home/kelvin/.rvm/gems/ruby-2.1.1/gems/curb-0.8.5 for inspection. Results logged to /home/kelvin/.rvm/gems/ruby-2.1.1/extensions/x86-linux/2.1.0/curb-0.8.5/gem_make.out
我然后谷歌错误并得到了这导致我这
当我在我的gem主目录(〜/ .rvm/gems/ruby-2.1.1)中执行ls -ladg curb-*时出现以下错误
ls: cannot access curb-*: No such file or directory
请告知如何修复gem install curb