无法在MacOS Sierra 10.12.1上安装Jekyll

3
我正在尝试使用以下命令安装 Jekyll

bundle install

sudo gem install jekyll

但是我遇到了一个错误,我在早期的Mac版本中找到了解决方案,但对于 Sierra 版本并不适用。

以下是输出结果:

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.17/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20170117-1518-aaehhb.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

感谢您的提前支持!
1个回答

0

你需要安装Ruby DevKit。根据你的Ruby安装情况,选择正确的安装方式。


嗨@deveth0,我在Ruby下载页面上找不到任何Mac链接,只有Windows链接,无论如何感谢你,我会继续搜索! - jthmiranda
我认为这个线程应该会对你有所帮助:https://dev59.com/l2oy5IYBdhLWcg3wsP_Q - deveth0
是的,这很有帮助,我打算安装开发者工具,希望能完成这个! - jthmiranda

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接