Ruby 无法安装compass
上周,由于bash“易受攻击的问题”,我在cygwin中进行了更新Ruby 无法安装compass,ruby,cygwin,ffi,compass,Ruby,Cygwin,Ffi,Compass,上周,由于bash“易受攻击的问题”,我在cygwin中进行了更新 从那以后,我再也不能编译sass了 我尝试重新安装ruby,在一些安装失败后重新安装cygwin,我安装了它并用“gem update--system” 它正在运行,但当我尝试安装compass时,收到以下消息: > /usr/bin/ruby.exe -r ./siteconf20141006-7856-1td7wzb.rb extconf.rb > checking for ffi.h... *** extco
从那以后,我再也不能编译sass了
我尝试重新安装ruby,在一些安装失败后重新安装cygwin,我安装了它并用
“gem update--system”
它正在运行,但当我尝试安装compass时,收到以下消息:
> /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
我真的很沮丧!!'
系统Windows 7 64位
Cygwin试试这个:
根据您的ruby版本下载并安装ruby开发工具包
如果有任何问题,请访问github上的wiki
在OSX上,这起到了作用:
如果gem安装compass
失败,请尝试
gem安装ffi
如果同样失败,错误似乎是ffi构建在/usr/bin
中查找gcc-4.2
如果安装了gcc,只需通过键入在/usr/bin
中创建符号链接即可
sudo ln-s gcc-4.2
否则,您可能需要首先安装gcc(googlethat)是的,对我来说,它只是
gcc
环境,所以您可以尝试一下
sudo apt-get install gcc
这在ubuntu中对我很有效:)确保安装了xcode
xcode-select --install
如果已经安装,请确保您已接受TOS
sudo xcodebuild -license
向下滚动至底部并键入agree
它应该与上述步骤一起工作
如果在执行上述两个步骤后发现以下问题
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/compass
试试下面的
sudo su
sudo gem install -n /usr/local/bin compass
我知道已经有一段时间了,但是你找到这个问题的解决方案了吗?对于CentOS,
yum-install-gcc
我必须使用sudo-apt-get-install-make
除了安装gcc之外还安装make。Kornking的操作系统是Windows。如果你真的读过这个问题,你会发现Kornking的系统是Windows。所以没有XCode。
sudo su
sudo gem install -n /usr/local/bin compass