2014-10-06 197 views
10

上周我在cygwin上做了一个更新,因为bash是“易受攻击的问题”。
之后,我无法再编译sass了。
我试图重新安装红宝石,经过一番安装失败,重新安装cygwin的我安装了它,并与
更新“宝石更新--system”
运行它,但是当我试图安装指南针我得到了以下信息:无法安装指南针

> /usr/bin/ruby.exe -r ./siteconf20141006-7856-1td7wzb.rb extconf.rb 
> checking for ffi.h... *** 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/bin/ruby 
> --with-ffi_c-dir 
> --without-ffi_c-dir 
> --with-ffi_c-include 
> --without-ffi_c-include=${ffi_c-dir}/include 
> --with-ffi_c-lib 
> --without-ffi_c-lib=${ffi_c-dir}/ 
> --with-libffi-config 
> --without-libffi-config 
> --with-pkg-config 
> --without-pkg-config /usr/share/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError) 
> You have to install development tools first. from 
> /usr/share/ruby/2.0.0/mkmf.rb:565:in `try_cpp' from 
> /usr/share/ruby/2.0.0/mkmf.rb:1044:in `block in have_header' from 
> /usr/share/ruby/2.0.0/mkmf.rb:895:in `block in checking_for' from 
> /usr/share/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone' 
> from /usr/share/ruby/2.0.0/mkmf.rb:310:in `open' from 
> /usr/share/ruby/2.0.0/mkmf.rb:340:in `block in postpone' from 
> /usr/share/ruby/2.0.0/mkmf.rb:310:in `open' from 
> /usr/share/ruby/2.0.0/mkmf.rb:336:in `postpone' from 
> /usr/share/ruby/2.0.0/mkmf.rb:894:in `checking_for' from 
> /usr/share/ruby/2.0.0/mkmf.rb:1043:in `have_header' from 
> extconf.rb:16:in `<main>' 
> 
> extconf failed, exit code 1 

我试图安装FFI(“创业板安装FFI”和“创业板安装FFI - 事先”),我得到了同样的消息

这里是日志(.gem /红宝石/扩展/ x86_64的,cygwin的/ ffi-1.9.5/gem_make.out)

package configuration for libffi is not found 
"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 " 
checked program was: 
/* begin */ 
1: #include "ruby.h" 
2: 
3: int main(int argc, char **argv) 
4: { 
5: return 0; 
6: } 
/* end */ 

我真的很沮丧!

操作系统Windows 7 64位 Cygwin的

+0

我知道这已经有一段时间了,但是您是否找到了解决此问题的解决方案? – Fred 2015-02-06 18:14:15

回答

2

在OSX这工作:

如果gem install compass失败,请尝试

gem install ffi 的情况下,也失败,错误似乎是,该FFI构建看起来/usr/bingcc-4.2

如果您安装了gcc,只需在/usr/bin之内创建一个符号链接打字

sudo ln -s gcc gcc-4.2

否则,你可能需要先安装gcc(谷歌认为)

19

是的,对我来说这只是gcc环境,所以你可以尝试

sudo apt-get install gcc 

,对于工作我在Ubuntu的:)

+0

对于CentOS,'yum install gcc' – 2016-07-31 01:35:27

+5

我不得不使用'sudo apt-get install make'来安装gcc以外的make。# – 2016-11-10 16:04:00

+0

阅读问题。 Kornking的操作系统是Windows。 – 2017-08-11 06:00:16

3

确保xcode安装。

xcode-select --install 

如果已经安装,请确保您已接受服务条款。

sudo xcodebuild -license 

向下滚动到底部并键入同意。

它应该与上述步骤一起工作。

如果出现上述2后做了以下问题步骤

ERROR: While executing gem ... (Errno::EPERM) 
Operation not permitted - /usr/bin/compass 

尝试以下。

sudo su 
sudo gem install -n /usr/local/bin compass 
+0

如果你真的看过这个问题,你会注意到Kornking的系统是WIndows。所以...没有XCode。 – 2017-08-11 05:59:40