I am trying to archive my first iOS 4.3 Application for iPhone and I always encounter this error:
我正在尝试将我的第一个ios4.3应用程序存档,我总是会遇到这个错误:
Command /usr/sbin/chown failed with exit code 1
I have searched through various forums, trying solutions such as changing the Alternate Install Group (which I don't know what to change to), and turning on 'Skip Install'.
我搜索了各种论坛,尝试了一些解决方案,比如更改备用安装组(我不知道该更改什么),并打开“跳过安装”。
13 个解决方案
#1
86
I was having difficulty with the SetOwnerAndGroup part of Archiving - I was getting /usr/sbin/chown failed, and it was getting 'operation not permitted' on each file it tried to 'chown'.
我在SetOwnerAndGroup部分的归档工作中遇到了困难——我得到了/usr/sbin/chown失败了,并且在每个试图“chown”的文件上都得到了“不允许的操作”。
This was easily tested in the terminal - 'chown' doesn't work, but 'sudo chown' does. Since I had no need to be changing file permissions, the simplest solution was to not do the chown.
这在终端上很容易测试——“chown”不工作,但“sudo chown”也可以。由于我不需要更改文件权限,最简单的解决方案是不做chown。
The screenshot above shows - I just blanked out Install Owner/Group, and that did it.
上面的截屏显示了——我只是清空了安装所有人/组,这样做了。
#2
63
As dumb as it sounds, in XCode 5.1.1, all I had to do was quit out and restart XCode just now. I know it's not much of an "answer" but it just worked for me.
在XCode 5.1.1中,在XCode 5.1.1中,我所要做的就是退出并重新启动XCode。我知道这不是什么“答案”,但它对我很有效。
#3
47
When I got this error, rebooting my computer fixed it.
当我得到这个错误,重新启动我的电脑修复它。
#4
24
I have tried all the other solutions but none of them worked for me. So I have run this on a terminal to change the owner to me on every file in my project:
我已经尝试了所有其他的解决方案,但没有一个对我有效。因此,我在一个终端上运行这个程序,在我的项目中每个文件上都将所有者更改为我:
sudo chown -R my_username:my_group ./my_project_folder
where "my_username" is you username, "my_group" is your group (this is usually staff) and "my_project_folder" your project's folder.
其中“my_username”是您的用户名,“my_group”是您的组(通常是staff)和“my_project_folder”项目的文件夹。
#5
6
None of the other solutions worked for me on Xcode 4.5. What I had to do was the following:
在Xcode 4.5中,没有其他的解决方案对我有效。我需要做的是:
The fix is by removing the armv6 architecture from both your project and the CordovaLib project, clean both projects, and rebuild.
修复是通过从您的项目和CordovaLib项目中移除armv6架构,同时清理两个项目,并进行重建。
源
#6
2
To it works in my environment I cleaned all information about permission, as +adalle said, complemented by Tom and Phil
在我的环境中,我清除了所有关于许可的信息,正如+adalle所说的,由Tom和Phil补充。
I emptied the fields Install Group, Install Owner, Install Permission including the Cordova SubProject
我清空了字段安装组、安装所有者、安装权限,包括Cordova子项目。
#7
1
I tried all possible variants and they didn't help me. So I downloaded old XCode 4.4.1 and voila - application archived successfully :)
我尝试了所有可能的变体,但他们没有帮助我。因此,我下载了老XCode 4.4.1和voila -应用程序存档成功:)
#8
1
- Select the target that's giving you the error
- 选择给你错误的目标。
- Change
Build Active Architecture Only
from Yes to No - 只从“是”到“否”构建活动架构。
That worked for me.
为我工作。
#9
0
Not sure if this is the same problem you are having, but this fixed it for me:
不确定这是否和你的问题一样,但这对我来说是固定的:
When I created my XCode project, my app name had a space in it, so trying to deploy my app always failed. I was able to fix this by using a Custom Archive Name
.
当我创建XCode项目时,我的应用程序名有一个空间,所以尝试部署我的应用程序总是失败。我可以通过使用自定义存档名称来修复这个问题。
In XCode 4...
在XCode 4…
- Edit the Deployment Scheme
- 编辑部署方案
- Click on the Archive tab
- 单击Archive选项卡。
- Then specify an Archive Name that doesn't have spaces in it.
- 然后指定一个没有空格的存档名称。
#10
0
When this happens to me on Xcode 8, I do "Clean build folder" 2 times (the first time it throws an error, but the second time succeeds) and then archive again.
当我在Xcode 8上遇到这种情况时,我做了2次“清理构建文件夹”(第一次抛出错误,但是第二次成功),然后再次归档。
Note: The "Clean build folder" option is under "Product" Menu, hold the alt button and you will see the "Clean" option changing to "Clean build folder".
注意:“清洁构建文件夹”选项在“产品”菜单下,按住alt键,您将看到“Clean”选项切换到“Clean build文件夹”。
#11
#12
#13
0
For me reboot my mac fixed it. OS High Sierra, xCode 9.2
我的mac电脑重新启动了。高Sierra, xCode 9.2。
#1
86
I was having difficulty with the SetOwnerAndGroup part of Archiving - I was getting /usr/sbin/chown failed, and it was getting 'operation not permitted' on each file it tried to 'chown'.
我在SetOwnerAndGroup部分的归档工作中遇到了困难——我得到了/usr/sbin/chown失败了,并且在每个试图“chown”的文件上都得到了“不允许的操作”。
This was easily tested in the terminal - 'chown' doesn't work, but 'sudo chown' does. Since I had no need to be changing file permissions, the simplest solution was to not do the chown.
这在终端上很容易测试——“chown”不工作,但“sudo chown”也可以。由于我不需要更改文件权限,最简单的解决方案是不做chown。
The screenshot above shows - I just blanked out Install Owner/Group, and that did it.
上面的截屏显示了——我只是清空了安装所有人/组,这样做了。
#2
63
As dumb as it sounds, in XCode 5.1.1, all I had to do was quit out and restart XCode just now. I know it's not much of an "answer" but it just worked for me.
在XCode 5.1.1中,在XCode 5.1.1中,我所要做的就是退出并重新启动XCode。我知道这不是什么“答案”,但它对我很有效。
#3
47
When I got this error, rebooting my computer fixed it.
当我得到这个错误,重新启动我的电脑修复它。
#4
24
I have tried all the other solutions but none of them worked for me. So I have run this on a terminal to change the owner to me on every file in my project:
我已经尝试了所有其他的解决方案,但没有一个对我有效。因此,我在一个终端上运行这个程序,在我的项目中每个文件上都将所有者更改为我:
sudo chown -R my_username:my_group ./my_project_folder
where "my_username" is you username, "my_group" is your group (this is usually staff) and "my_project_folder" your project's folder.
其中“my_username”是您的用户名,“my_group”是您的组(通常是staff)和“my_project_folder”项目的文件夹。
#5
6
None of the other solutions worked for me on Xcode 4.5. What I had to do was the following:
在Xcode 4.5中,没有其他的解决方案对我有效。我需要做的是:
The fix is by removing the armv6 architecture from both your project and the CordovaLib project, clean both projects, and rebuild.
修复是通过从您的项目和CordovaLib项目中移除armv6架构,同时清理两个项目,并进行重建。
源
#6
2
To it works in my environment I cleaned all information about permission, as +adalle said, complemented by Tom and Phil
在我的环境中,我清除了所有关于许可的信息,正如+adalle所说的,由Tom和Phil补充。
I emptied the fields Install Group, Install Owner, Install Permission including the Cordova SubProject
我清空了字段安装组、安装所有者、安装权限,包括Cordova子项目。
#7
1
I tried all possible variants and they didn't help me. So I downloaded old XCode 4.4.1 and voila - application archived successfully :)
我尝试了所有可能的变体,但他们没有帮助我。因此,我下载了老XCode 4.4.1和voila -应用程序存档成功:)
#8
1
- Select the target that's giving you the error
- 选择给你错误的目标。
- Change
Build Active Architecture Only
from Yes to No - 只从“是”到“否”构建活动架构。
That worked for me.
为我工作。
#9
0
Not sure if this is the same problem you are having, but this fixed it for me:
不确定这是否和你的问题一样,但这对我来说是固定的:
When I created my XCode project, my app name had a space in it, so trying to deploy my app always failed. I was able to fix this by using a Custom Archive Name
.
当我创建XCode项目时,我的应用程序名有一个空间,所以尝试部署我的应用程序总是失败。我可以通过使用自定义存档名称来修复这个问题。
In XCode 4...
在XCode 4…
- Edit the Deployment Scheme
- 编辑部署方案
- Click on the Archive tab
- 单击Archive选项卡。
- Then specify an Archive Name that doesn't have spaces in it.
- 然后指定一个没有空格的存档名称。
#10
0
When this happens to me on Xcode 8, I do "Clean build folder" 2 times (the first time it throws an error, but the second time succeeds) and then archive again.
当我在Xcode 8上遇到这种情况时,我做了2次“清理构建文件夹”(第一次抛出错误,但是第二次成功),然后再次归档。
Note: The "Clean build folder" option is under "Product" Menu, hold the alt button and you will see the "Clean" option changing to "Clean build folder".
注意:“清洁构建文件夹”选项在“产品”菜单下,按住alt键,您将看到“Clean”选项切换到“Clean build文件夹”。
#11
0
- Clean your project.
- 清洁您的项目。
- Clean your build Folder. (Product > ⌥ > Clean Build Folder)
- 清洁你的建立文件夹。(产品>⌥>清洁建立文件夹)
- Set the target device to Generic iOS Device .
- 将目标设备设置为通用的iOS设备。
#12
0
I had the same issue with Xcode . It started working after restarting Xcode. In the screenshot , Xcode ->build settings , installed group was empty after restarting Xcode .the group id it has showed as some number.
我对Xcode也有同样的问题。它在重新启动Xcode后开始工作。在截图中,Xcode ->构建设置,在重新启动Xcode后,安装组为空。
#13
0
For me reboot my mac fixed it. OS High Sierra, xCode 9.2
我的mac电脑重新启动了。高Sierra, xCode 9.2。