错误:无法运行/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/ibtool(没有这样的文件) [英] Error: Can't run /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/ibtool (no such file)

查看:64
本文介绍了错误:无法运行/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/ibtool(没有这样的文件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 ibtool 进行 iOS 开发(本地化),但是当我从终端运行它时,出现以下错误:

I'm trying to use ibtool for iOS development (localization), but when I run it from terminal I get the following error:

Error: Can't run /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/ibtool (no such file).

是什么?

推荐答案

对此进行了一些挖掘,发现了一些对类似问题的良好堆栈响应 - 但没有适用于所有来者的通用解决方案,所以我想我会做一个.:)

Did some digging on this one and found a few good Stack responses to similar problems - but no generic solutions for all comers, so I figured I'd make one. :)

问题的原因是:在现代版本的 OSX 中,如果您从 App Store 安装 Xcode,它会像所有其他应用程序一样自行安装 - 这意味着它位于不同的目录中 比历史上的情况.不幸的是,这具有深远的影响,会影响 Xcode 及其命令行工具,以及 - 事实上 - 远远超出本问题范围的其他事情.

The cause of the problem is: in modern versions of OSX, if you install Xcode from the App Store, it installs itself like all other Apps - which means it's in a different directory than was historically the case. Unfortunately, this has far-reaching implications that affect both Xcode and its command-line tools and - in fact - other things that reach far beyond the scope of this question.

所以,在他们解决问题之前,让我们谈谈解决方法.许多人建议更改您的 Xcode 系统变量以指向App Store"文件夹,但我认为这是一种危险的矫枉过正 - 您只是不知道如果他们修复路径可能会造成什么样的混乱!

So, until they fix it, let's talk workarounds. Many people recommend changing your Xcode system variables to point to the 'App Store' folder, but I think this is a dangerous overkill - you just don't know what kind of mayhem it may cause if they ever fix their pathing!

相反,我建议使用终端更改影响ibtool(或您使用的任何工具)的系统链接,如下所示:

Instead, I recommend using Terminal to change only the system link affecting ibtool (or whatever tool you're using), like so:

推荐的解决方案

步骤 1:删除旧的系统链接

sudo rm /usr/bin/ibtool

第 2 步:创建新的系统链接

sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/ibtool /usr/bin/ibtool

仅供参考,这是另一个可以解决此问题的命令 - 但出于上述原因,我不推荐使用它:

For reference only, here is another command that will fix this - but I DO NOT recommend using it for the reasons stated above:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

我可以看到,如果您遇到各种与/Developer 相关的错误,xcode-select 可能是一个合适的解决方案,但在这种情况下,我只会在不使用 App Store 的情况下重新安装 Xcode并从一开始就让它顺利进行.

I can see the argument that xcode-select might be a proper solution if you have all kinds of /Developer-related errors, but in that case I would just reinstall Xcode without using the App Store and get it going good from the start.

对于我们其他人来说,在 App Store 的道路上已经走得太远了,无法重新完成所有工作,请参见上文.

For the rest of us already too far down the App Store path to re-do it all, see above.

这篇关于错误:无法运行/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/ibtool(没有这样的文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆