codesign_allocate helper tool cannot be found or used

貌似是使用了os的,不是iPhone 的签名工具。

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. :)

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.

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!

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

Recommended solution

Step 1: Remove the old system link

sudo rm /usr/bin/ibtool
Step 2: Create a new system link

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
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.

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

CodeSign的时候,出现了大意为:
object file format unrecognized, invalid, or unsuitable
/usr/bin/codesign failed with exit code 1
这样的错误。

最后还是在StackOverflow上找到了答案。用下面的命令:
sudo mv /usr/bin/codesign_allocate /usr/bin/codesign_allocate_old (我不需要。因为两个Xcode冲突,谁都没有给我一个codesign_allocate到该目录)
sudo ln -s /DeveloperXcode4/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin
解决了问题。如下图:

codesign_error

http://blog.163.com/zhanghaoand@126/blog/static/89857478201421762319420/

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值