命令 /usr/sbin/chown 失败,退出代码为 1 (xcode6)

Command /usr/sbin/chown failed with exit code 1 (xcode6)

我不知道什么是 this.I 我正在尝试存档我的 app.I 知道有很多答案,但我无法理解 answer.so 请有人知道怎么解决可以告诉我。

 SetOwnerAndGroup shivamrishi:staff /Users/shriyarishi/Library/Developer/Xcode/DerivedData/QuoteU-cqodwskdmizaqjgavubtjxrtedhv/Build/Intermediates/ArchiveIntermediates/QuoteU/InstallationBuildProductsLocation/Applications/QuoteU.app
cd "/Users/shriyarishi/Desktop/QuoteU "
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/usr/sbin/chown -RH shivamrishi:staff /Users/shriyarishi/Library/Developer/Xcode/DerivedData/QuoteU-cqodwskdmizaqjgavubtjxrtedhv/Build/Intermediates/ArchiveIntermediates/QuoteU/InstallationBuildProductsLocation/Applications/QuoteU.app

最后一个密码

  chown: /Users/shriyarishi/Library/Developer/Xcode/DerivedData/QuoteU-cqodwskdmizaqjgavubtjxrtedhv/Build/Intermediates/ArchiveIntermediates/QuoteU/InstallationBuildProductsLocation/Applications/QuoteU.app: Operation not permitted
Command /usr/sbin/chown failed with exit code 1

图片 https://drive.google.com/file/d/0B2z_d4wEKPEFVWsxV0xUczhFck0/view?usp=sharing

只有超级用户才能更改文件。来自 chown(8) 手册页:

For obvious security reasons, the ownership of a file may only be altered by a super-user.

如果您想更改文件所有权,您应该使用 sudosudo 将需要您的密码,并且您在计算机上的 admin 组中(即您必须被标记为允许管理计算机)。

sudo /usr/sbin/chown -RH shivamrishi:staff \
  /Users/shriyarishi/Library/Developer/Xcode/DerivedData/QuoteU-cqodwskdmizaqjgavubtjxrtedhv/Build/Intermediates/ArchiveIntermediates/QuoteU/InstallationBuildProductsLocation/Applications/QuoteU.app

这发生在我的配置文件过期后,我更新了它。 这个错误是在某些 pods 代码中出现的,所以我使用

删除了 pod
pod deintegrate

请检查 this,这是从您的项目中完全删除 pods 的绝妙方法。

然后pod install

对我有用!