1. 程式人生 > >jekyll Mac上各種安裝問題總結

jekyll Mac上各種安裝問題總結

Mac上自帶了ruby,版本資訊如下:
qiyongdeMacBook-Air:webproxy qiyong$ ruby -v
ruby 2.0.0p481 (2014-05-08 revision 45883) [universal.x86_64-darwin14]

$sudo gem update --system
(關於一些更新命令的補充
$ gem install rubygems-update #可能需要管理員許可權
$ update_rubygems #這裡也一樣)

—————Terminal output——————————
Updating rubygems-update
Fetching: rubygems-update-2.5.0.gem (100%)
Successfully installed rubygems-update-2.5.0
Parsing documentation for rubygems-update-2.5.0
Installing ri documentation for rubygems-update-2.5.0
Installing darkfish documentation for rubygems-update-2.5.0
Installing RubyGems 2.5.0
RubyGems 2.5.0 installed
Parsing documentation for rubygems-2.5.0
Installing ri documentation for rubygems-2.5.0

$sudo gem install jekyll
—————Terminal output——————————
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.

current directory: /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.10/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20151129-5728-5lq17h.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.

以上命令失敗後,執行以下命令,安裝Xcode命令列工具,安裝成功後,再執行$sudo gem install jekyll
xcode-select --install

————————一些有用的帖子—————————
How to update Ruby to 1.9.x on Mac?
Mac終端安裝“Install Command Line Developer Tools”
RubyGems簡介和使用
RVM相關的資料1
RVM相關的資料2