安装在Mac上的Sass 3.4.9(10.9.5);罗盘不会安装;已安装XCode
首先,我是Sass/Compass/Ruby的新手 Ruby安装为2.0——Ruby 2.0.0p481(2014-05-08修订版45883)[universal.x86_64-darwin13] 第二,安装了XCode——版本6.1.1(6A2008a) 第三,使用Sass和Compass in Action的说明(2013年,荷兰等),我安装了Sass安装在Mac上的Sass 3.4.9(10.9.5);罗盘不会安装;已安装XCode,xcode,macos,sass,compass-sass,compass,Xcode,Macos,Sass,Compass Sass,Compass,首先,我是Sass/Compass/Ruby的新手 Ruby安装为2.0——Ruby 2.0.0p481(2014-05-08修订版45883)[universal.x86_64-darwin13] 第二,安装了XCode——版本6.1.1(6A2008a) 第三,使用Sass和Compass in Action的说明(2013年,荷兰等),我安装了Sass $sudo gem install sass -- it installed as version 3.4.9 那么 因此,在阅读了有关
$sudo gem install sass -- it installed as version 3.4.9
那么
因此,在阅读了有关版本不兼容的内容后,我卸载了Sass,并尝试使用以下方法一起重新安装Sass/Compass:
$sudo gem install compass
现在我得到了以下信息,除了没有安装Sass之外,与前面的一组错误消息相同:
Cairo-401:~ michael$ sudo gem install compass
Password:
Building native extensions. This could take a while...
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20141230-2901-do0h0m.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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/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
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/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 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:502:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1044:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1043:in `have_header'
from extconf.rb:16:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.6 for inspection.
>Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/ffi-1.9.6/gem_make.out
Cairo-401:~ michael$ sass -v
-bash: sass: command not found
Cairo-401:~ michael$
Cairo-401:~michael$sudo gem安装指南针
密码:
构建本机扩展。这可能需要一段时间。。。
错误:安装指南针时出错:
错误:无法生成gem本机扩展。
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/Ruby-r./siteconf20141230-2901-do0h0m.rb extconf.rb
正在检查ffi.h.。**extconf.rb失败***
由于某些原因无法创建Makefile,可能缺少必要的
库和/或标题。有关详细信息,请查看mkmf.log文件。你可以
需要配置选项。
提供的配置选项:
--使用opt dir
--不带opt dir
--选择包含
--不带opt include=${opt dir}/include
--使用opt lib
--不带opt lib=${opt dir}/lib
--用make prog
--没有make prog
--srcdir=。
--库尔迪尔
--ruby=/System/Library/Frameworks/ruby.framework/Versions/2.0/usr/bin/ruby
--带-ffi_c-dir
--不带-ffi_c-dir
--带-ffi_c-include
--不带-ffi_c-include=${ffi_c-dir}/include
--带-ffi_c-lib
--不带-ffi_c-lib=${ffi_c-dir}/
--使用libffi配置
--没有libffi配置
--使用pkg配置
--没有pkg配置
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/mkmf.rb:434:在“try_do”中:编译器未能生成可执行文件。(运行时错误)
您必须首先安装开发工具。
from/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/mkmf.rb:549:in'block in try_compile'
from/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/mkmf.rb:502:in'with_werror'
from/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/mkmf.rb:549:in'try_compile'
from/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/mkmf.rb:1044:in'block in have_header'
from/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/mkmf.rb:895:in'block in checking_'
from/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/mkmf.rb:340:in'block(2层)in
from/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/mkmf.rb:310:in'open'
from/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/mkmf.rb:340:in'block in delay'
from/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/mkmf.rb:310:in'open'
from/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/mkmf.rb:336:in“推迟”
from/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/mkmf.rb:894:in'checking_'
from/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/Ruby/2.0.0/mkmf.rb:1043:in'have_header'
来自extconf.rb:16:in`'
extconf失败,退出代码1
Gem文件仍将安装在/Library/Ruby/Gems/2.0.0/Gems/ffi-1.9.6中以供检查。
>结果记录到/Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/ffi-1.9.6/gem_make.out
开罗401:~michael$sass-v
-bash:sass:未找到命令
开罗401:~michael$
谢谢你的建议
更新:2014年2月1日
我安装了OS 10.10.1,更新了Xcode,然后用“$sudo gem install compass”命令重新安装。Sass和Compass均未安装挂接装置 我也有同样的问题。关于这方面的信息很少,但其他人似乎都能够毫不费力地安装sass和compass。我将在这里关注解决方案。
Cairo-401:~ michael$ sudo gem install compass
Password:
Building native extensions. This could take a while...
ERROR: Error installing compass:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20141230-2901-do0h0m.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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/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
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/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 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `block in try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:502:in `with_werror'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:549:in `try_compile'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1044:in `block in have_header'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:895:in `block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:310:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:894:in `checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:1043:in `have_header'
from extconf.rb:16:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.6 for inspection.
>Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/ffi-1.9.6/gem_make.out
Cairo-401:~ michael$ sass -v
-bash: sass: command not found
Cairo-401:~ michael$