简体   繁体   English

Xcode 构建构建错误:sh:错误的解释器:权限被拒绝

[英]Xcode Build build error: sh: bad interpreter: Permission denied

I've been trying to compile a Cordova project in Xcode with no success for the last 2 days.过去 2 天,我一直试图在 Xcode 中编译 Cordova 项目,但没有成功。 First of all, this is a clone of another project, with just a few changes, that compiles with no issues.首先,这是另一个项目的克隆,只有一些更改,编译没有问题。 And my experience in Mac is only using Xcode to compile Cordova projects for iOs.我在 Mac 上的经验是只使用 Xcode 为 iO 编译 Cordova 项目。

The error I get is the following:我得到的错误如下:

Xcode 错误

The step it's talking about is this:它所说的步骤是这样的:

构建阶段

I've had this same error other times, but by giving execute privileges to the sh file with chmod +x as explained in Cordova Xcode build failed "Permission denied" , it worked, but won't this time.我其他时候也遇到过同样的错误,但是通过使用 chmod +x 为 sh 文件提供执行权限,如Cordova Xcode build failed "Permission denied" 中所述,它起作用了,但这次不会。

*What the script does is basically copying the www folder from Cordova to the ios project. *脚本所做的基本上是将 www 文件夹从 Cordova 复制到 ios 项目。 And is exactly the same script in other projects that compile with no issues.并且与其他编译没有问题的项目中的脚本完全相同。

So, searched for the error, and gave total permisions with chmod 777 (first I went with +x as I've done other times as mentioned, but didn't work so I went for total control just in case) to both sh scripts, the one mentioned in the error, and the one mentioned in the step.因此,搜索错误,并使用 chmod 777 给出了总权限(首先我使用 +x,正如我提到的其他时间一样,但没有工作,所以我去完全控制以防万一)到两个 sh 脚本,错误中提到的那个,以及步骤中提到的那个。 And finally to the entire project folder with chmod -R .. just in case.最后使用 chmod -R .. 到整个项目文件夹以防万一。

I also gave full access control to the disk to Xcode on the security & privacy settings (Wouldn't understand it would be necessary cause as mentioned, it compiles other projects, but again, just in case):我还在安全和隐私设置上为 Xcode 提供了对磁盘的完全访问控制(不明白这是必要的,因为如上所述,它编译其他项目,但同样,以防万一):

安全 % 隐私

Also moved it to the Desktop from the Documents folder it was (Although the other project is in the same folder in Documents, and as said, it compiles), but didn't work there either.还将它从原来的 Documents 文件夹移动到桌面(尽管另一个项目在 Documents 的同一个文件夹中,并且如上所述,它可以编译),但也没有在那里工作。

I'm able to execute both scripts in the Terminal, but since one relies on Xcode variables won't work, but it let's me run it.我能够在终端中执行这两个脚本,但是由于依赖于 Xcode 变量的脚本不起作用,但它让我运行它。

I've checked if I see any difference between this project and the other one (That lets me build it), but I see no differences that I can see, apart fromn the change in the code.我已经检查过这个项目和另一个项目之间是否有任何区别(这让我可以构建它),但是除了代码中的更改之外,我看不到任何区别。

If it helps, I'm running Catalina 10.15.6 Any help?如果有帮助,我正在运行 Catalina 10.15.6 有什么帮助吗?

Problem was there's a space between /bin and /sh in the shell command of the Script.问题是在脚本的 shell 命令中 /bin 和 /sh 之间有一个空格。 "/bin/sh". “/bin/sh”。 /facepalm /面掌

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Xcode 构建问题 - 权限被拒绝 - Xcode Build Issue - permission denied xcode.sh 权限被拒绝 - xcode .sh permission denied 使用电话间隙.sh文件时,Xcode构建失败“权限被拒绝” - Xcode build failed “Permission denied” when using phone gap .sh files 詹金斯(Jenkins)建立Xcode-取得建立错误“权限被拒绝” - Jenkins building Xcode - getting build error “permission denied” Cordova Xcode构建失败“权限被拒绝” - Cordova Xcode build failed “Permission denied” 无法使用 `Pods-Runner/Pods-Runner-frameworks.sh: Permission denied` 错误构建 Flutter - Failed to build Flutter with `Pods-Runner/Pods-Runner-frameworks.sh: Permission denied` error 无法启动Xcode Profiler,错误:无法创建目录:/ <App name> WatchApp Extension.build(权限被拒绝) - Unable to start Xcode Profiler, Error: Unable to create directory: /<App name> WatchApp Extension.build (Permission denied) Xcode 10 中的 Permission Denied 错误阻止 Build...Command PhaseScriptExecution 失败,退出代码为非零 - Permission Denied error in Xcode 10 preventing Build...Command PhaseScriptExecution failed with a nonzero exit code 当我在 xcode 中构建我的应用程序时,出现错误:/bin/sh: bad interpreter: Operation not allowed - when I built my app in xcode,there is an error:/bin/sh: bad interpreter: Operation not permitted Xcode 8中的权限被拒绝错误 - Permission denied error in xcode 8
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM