首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Jazzy OSX 10.11.3 Xcode 7.2.1发行查找XCRUN

Jazzy OSX 10.11.3 Xcode 7.2.1发行查找XCRUN
EN

Stack Overflow用户
提问于 2016-02-26 18:13:55
回答 2查看 402关注 0票数 1

对于下面的命令行,Jazzy有以下问题。检查过命令行工具等,看上去都不错。

代码语言:javascript
复制
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
$ whereis xcrun
/usr/bin/xcrun

shell命令/脚本

代码语言:javascript
复制
jazzy \
--clean \
--author Realm \
--author_url https://realm.io \
--github_url https://github.com/realm/realm-cocoa \
--github-file-prefix https://github.com/realm/realm-cocoa/tree/v0.96.2 \
--module-version 0.96.2 \
--xcodebuild-arguments -scheme,RealmSwift \
--module RealmSwift \
--root-url https://realm.io/docs/swift/0.96.2/api/ \
--output docs/swift_output \
--theme docs/themesJeffs-MBP-2:smallSDKSwift jefforthober$ jazzy \
>   --clean \
>   --author Realm \
>   --author_url https://realm.io \
>   --github_url https://github.com/realm/realm-cocoa \
>   --github-file-prefix https://github.com/realm/realm-cocoa/tree/v0.96.2 \
>   --module-version 0.96.2 \
>   --xcodebuild-arguments -scheme,RealmSwift \
>   --module RealmSwift \
>   --root-url https://realm.io/docs/swift/0.96.2/api/ \
>   --output docs/swift_output \
>   --theme docs/themes
xcrun: error: unable to find utility "xcrun", not a developer tool or in PATH
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:211:in `spawn': No such file or directory -  (Errno::ENOENT)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:211:in `popen_run'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:99:in `popen3'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/open3.rb:279:in `capture3'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:86:in `xcrun'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:119:in `swift_info'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:57:in `swift_version'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:53:in `block in find_swift_version'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:44:in `each'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:44:in `each'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:53:in `select'
from /Library/Ruby/Gems/2.0.0/gems/xcinvoke-0.2.1/lib/xcinvoke/xcode.rb:53:in `find_swift_version'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.5.0/lib/jazzy/sourcekitten.rb:136:in `run_sourcekitten'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.5.0/lib/jazzy/doc_builder.rb:57:in `block in build'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.5.0/lib/jazzy/doc_builder.rb:55:in `chdir'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.5.0/lib/jazzy/doc_builder.rb:55:in `build'
from /Library/Ruby/Gems/2.0.0/gems/jazzy-0.5.0/bin/jazzy:15:in `<top (required)>'
from /usr/local/bin/jazzy:23:in `load'
from /usr/local/bin/jazzy:23:in `<main>'
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2016-04-30 05:31:00

看来这就是问题所在。>1版本的xcode已安装。XCODE / PREFERENES / LOCATIONS /命令行工具。选择合适的工具,即使在安装了新版本的工具后,也是空白的。

票数 0
EN

Stack Overflow用户

发布于 2022-10-06 15:10:18

在我的例子中,发生这种情况并不是因为我没有为Xcode指定位置,而是因为我使用的是Xcode 8。

这是一种奇怪的行为,因为在我的例子中,/usr/bin/xcrun是存在的,但它没有包含在/Applications/Xcode.app/Contents/Developer/usr/bin中。在以前版本的Xcode中,该目录包含xcrun,但在Xcode 8中不包含,至少在我的Mac版本中没有。

我尝试在那里创建一个符号链接,指向/usr/bin/xcrun,但它没有解决问题。

我找到的唯一解决方案是更改触发错误的代码,将/usr/bin/xcrun -find xcrun替换为/usr/bin/xcrun -find xcodebuild

我认为这是一件非常安全的事情,因为这个命令的目的是检查Xcode是否已正确安装,因此新命令完成了任务。令人放心的是,Qtbase做了什么:https://code.qt.io/cgit/qt/qtbase.git/commit/?h=wip/nacl

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35658845

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档