3

我试图jazzy在 Mojave beta 上安装,但没有这样做,因为我收到了这个错误

MacBook-Pro-Damian:~ damiandudycz$ sudo gem install jazzy
Password:
Building native extensions.  This could take a while...
ERROR:  Error installing jazzy:
    ERROR: Failed to build gem native extension.

    current directory: /Library/Ruby/Gems/2.3.0/gems/redcarpet-3.4.0/ext/redcarpet
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20180821-24471-1py1trb.rb extconf.rb
creating Makefile

current directory: /Library/Ruby/Gems/2.3.0/gems/redcarpet-3.4.0/ext/redcarpet
make "DESTDIR=" clean

current directory: /Library/Ruby/Gems/2.3.0/gems/redcarpet-3.4.0/ext/redcarpet
make "DESTDIR="
make: *** No rule to make target `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin18/ruby/config.h', needed by `autolink.o'.  Stop.

make failed, exit code 2

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/redcarpet-3.4.0 for inspection.
Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/redcarpet-3.4.0/gem_make.out

有人可以帮我解决这个问题吗?或者也许有其他方法可以在jazzy没有 gem 的情况下安装?

或者,也许您知道其他优秀的swift项目文档生成器?

4

3 回答 3

2

试试这个

sudo gem install -n /usr/local/bin jazzy
于 2019-11-29T05:13:14.280 回答
1

xcode-select --install为我做了这件事。
之后我可以通过安装 jazzy[sudo] gem install jazzy

于 2018-09-26T14:21:32.220 回答
0

这对我有用,不知道为什么,但确实有效。我认为它从 .pkg 手动安装了命令行工具

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
于 2018-10-04T13:22:34.637 回答