http://www.cnblogs.com/zhuhuoxingguang/p/6490912.htmlcss
以前一直用的windows電腦,忽然間切換成mac,各類不習慣,剛開始的時候連文件夾都找不到,悲催……html
還好,熟悉了兩天以後,基本上也可以操做了。windows
而後就是安裝各類開發軟件,因爲我的習慣了使用sass開發css,因此使用命令行安裝了sass,但是當安裝compass的時候,悲劇發生了。xcode
一直提示:sass
1
2
3
4
5
6
7
8
9
10
11
12
|
Building native extensions. This could take a
while
...
ERROR
: Error installing compass:
ERROR
: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/
2
.
0
.
0
/gems/ffi-
1
.
9
.
17
/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/
2
.
0
/usr/bin/ruby -r ./siteconf20170302-
3213
-i36x9b.rb extconf.rb
mkmf.rb can't find header files
for
ruby at /System/Library/Frameworks/Ruby.framework/Versions/
2
.
0
/usr/lib/ruby/include/ruby.h
extconf failed, exit code
1
Gem files will remain installed
in
/Library/Ruby/Gems/
2
.
0
.
0
/gems/ffi-
1
.
9
.
17
for
inspection.
Results logged to /Library/Ruby/Gems/
2
.
0
.
0
/extensions/universal-darwin-
16
/
2
.
0
.
0
/ffi-
1
.
9
.
17
/gem_make.out
|
而後就是各類求助,也搜索了不少解決方案,但是真的,沒有徹底解決。知道在知乎上看到一個答案ruby
而後就是命令行執行xcode-select --install,不幸的是,又提示安裝xcode軟件,沒辦法,只能安裝軟件咯!ui
漫長的下載時間,終於安裝好以後,執行命令spa
1
2
3
4
5
6
7
|
Building native extensions. This could take a
while
...
[[ASuccessfully installed ffi-
1
.
9
.
17
Fetching: rb-inotify-
0
.
9
.
8
.gem (
100
%)
Successfully installed rb-inotify-
0
.
9
.
8
Fetching: compass-
1
.
0
.
3
.gem (
100
%)
ERROR
: While executing gem ... (Errno::
EPERM
)
Operation
not
permitted - /usr/bin/compass
|
就是說依然安裝失敗,而後仔細看看這段報錯提示, Operation not permitted - /usr/bin/compass 就是說/usr/bin/compass這個文件夾禁止操做,以前二次安裝sass的時候,遇到過相似的提示,那就執行 sudo gem install -n /usr/local/bin compass命令行
終於提示安裝成功了。反覆折騰當中,對這幾個安裝命令都比較熟練了。