ruby – 无法安装指南针

前端之家收集整理的这篇文章主要介绍了ruby – 无法安装指南针前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
上周我在cygwin上发布了一个更新,因为这是一个“脆弱的问题”.
之后,我不能编译sass了.
我尝试重新安装 ruby,一些安装失败并重新安装cygwin我安装它并更新了“宝石更新 – 系统”
它运行,但是当我试图安装指南针我得到以下消息:
  1. > /usr/bin/ruby.exe -r ./siteconf20141006-7856-1td7wzb.rb extconf.rb
  2. > checking for ffi.h... *** extconf.rb Failed *** Could not create
  3. > Makefile due to some reason,probably lack of necessary libraries
  4. > and/or headers. Check the mkmf.log file for more details. You may
  5. > need configuration options.
  6. >
  7. > Provided configuration options:
  8. > --with-opt-dir
  9. > --without-opt-dir
  10. > --with-opt-include
  11. > --without-opt-include=${opt-dir}/include
  12. > --with-opt-lib
  13. > --without-opt-lib=${opt-dir}/lib
  14. > --with-make-prog
  15. > --without-make-prog
  16. > --srcdir=.
  17. > --curdir
  18. > --ruby=/usr/bin/ruby
  19. > --with-ffi_c-dir
  20. > --without-ffi_c-dir
  21. > --with-ffi_c-include
  22. > --without-ffi_c-include=${ffi_c-dir}/include
  23. > --with-ffi_c-lib
  24. > --without-ffi_c-lib=${ffi_c-dir}/
  25. > --with-libffi-config
  26. > --without-libffi-config
  27. > --with-pkg-config
  28. > --without-pkg-config /usr/share/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler Failed to generate an executable file. (RuntimeError)
  29. > You have to install development tools first. from
  30. > /usr/share/ruby/2.0.0/mkmf.rb:565:in `try_cpp' from
  31. > /usr/share/ruby/2.0.0/mkmf.rb:1044:in `block in have_header' from
  32. > /usr/share/ruby/2.0.0/mkmf.rb:895:in `block in checking_for' from
  33. > /usr/share/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
  34. > from /usr/share/ruby/2.0.0/mkmf.rb:310:in `open' from
  35. > /usr/share/ruby/2.0.0/mkmf.rb:340:in `block in postpone' from
  36. > /usr/share/ruby/2.0.0/mkmf.rb:310:in `open' from
  37. > /usr/share/ruby/2.0.0/mkmf.rb:336:in `postpone' from
  38. > /usr/share/ruby/2.0.0/mkmf.rb:894:in `checking_for' from
  39. > /usr/share/ruby/2.0.0/mkmf.rb:1043:in `have_header' from
  40. > extconf.rb:16:in `<main>'
  41. >
  42. > extconf Failed,exit code 1

我试图安装ffi(“gem install ffi”和“gem install ffi –pre”),我得到了相同的消息

这里是log(.gem / ruby​​ / extensions / x86_64-cygwin / ffi-1.9.5 / gem_make.out)

  1. package configuration for libffi is not found
  2. "gcc -o conftest.exe -I/usr/include/ruby-2.0.0 -I/usr/include/ruby-2.0.0/ruby/backward -I/usr/include/ruby-2.0.0 -I. -ggdb -O2 -pipe -Wimplicit-function-declaration conftest.c -L. -L/usr/lib -L. -fstack-protector -lruby200 -lpthread -lrt -ldl -lcrypt "
  3. checked program was:
  4. /* begin */
  5. 1: #include "ruby.h"
  6. 2:
  7. 3: int main(int argc,char **argv)
  8. 4: {
  9. 5: return 0;
  10. 6: }
  11. /* end */

我真的很沮丧!!

系统Windows 7 64位
Cygwin的

解决方法

是的,对我来说只是gcc环境,所以你可以试试
  1. sudo apt-get install gcc

这对我在ubuntu

猜你在找的Ruby相关文章