Xcode 无法创建输出文件,权限被拒绝

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6402003/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 21:17:53  来源:igfitidea点击:

Xcode can't create output file, permission denied

xcodecompiler-constructionpermissions

提问by Nathan H

In Xcode I cannot compile my application anymore, the error is:

在 Xcode 中,我无法再编译我的应用程序,错误是:

/usr/bin/lipo: can't create output file: /Users/nathan/Library/Developer/Xcode/DerivedData/PackageTracking-fpewhfohxohurlexwettvkopakyn/Build/Products/Release/PackageTracking.app/Contents/MacOS/PackageTracking (Permission denied)
error: couldn't remove '/Users/nathan/Library/Developer/Xcode/DerivedData/PackageTracking-fpewhfohxohurlexwettvkopakyn/Build/Products/Release/PackageTracking.app/Contents/MacOS/PackageTracking' after command failed: Permission denied

This folder was created by Xcode, why do I get a permission denied?

这个文件夹是由 Xcode 创建的,为什么我的权限被拒绝?

I tried to do a clean, same.

我试着做一个干净的,同样的。

回答by Abizern

Are you logged on to the nathanuser account?

您是否已登录到nathan用户帐户?

Have you tried deleting tho derived date location in Organiser and trying again? enter image description here

您是否尝试在管理器中删除导出的日期位置并重试? 在此处输入图片说明

回答by Brian Broom

I had a similar issue with permission denied to create folders in the /Users/username/Library/Developer/Xcodefolder.

我有一个类似的问题,在/Users/username/Library/Developer/Xcode文件夹中创建文件夹的权限被拒绝。

What fixed things for me was to do the following in terminal

对我来说固定的事情是在终端中执行以下操作

sudo chown -R username /Users/username/Library/Developer/Xcode