codesign_allocate helper tool cannot be found or used

转载 2015年10月26日 17:20:39

貌似是使用了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/

xcode 真机编译codesign failed with exit code 1错误 解决

这种错误出现目前我看到过一下几种。 1.证书的目录在登录和系统中都有而且同名,这样xcode就找不到所要的证书,解决办法删除同名。 2.证书删除错误重装证书后依然不能编译(这个...
  • menuconfig
  • menuconfig
  • 2015-10-23 17:54:50
  • 5457

osx 数字签名问题

给 osx 的app签名的时候,老是出现  the codesign_allocate helper tool cannot be found or used 的错误. 原因时,osx系统...
  • lanxiaziyi
  • lanxiaziyi
  • 2015-08-29 18:41:33
  • 597

codesign_allocate: error: unable to find utility "codesign_allocate", not a developer tool or in PAT

有人说这是证书问题~。~反正我是没能按证书的结局方法来解决这个问题咯,也许是有其他情况出现吧,就按着我遇到的问题来详解,也是为了防止以后遇到同样的问题找不到答案。 完整的描述是这样的:  ...
  • chenguixin2012
  • chenguixin2012
  • 2016-07-21 22:45:38
  • 450

配置程序及解决Command /usr/bin/codesign failed with exit code 1错误

作为iOS开发者,大家应该都讨厌把自己的程序转来转去,换各种电脑,因为苹果老是会出现莫名的错误,英语不好的更是感到无力,今天我就把常见的问题分享下: 1.如果要配置的电脑上有Xcode,只要不是...
  • PianZhideNanRen
  • PianZhideNanRen
  • 2014-08-18 17:52:31
  • 3704

xcode codesign 签名失败问题

"object file format unrecognized, invalid, or unsuitable" Xcode 错误解决方案 1)首先查看/usr/bin目录下是否存在c...
  • Blue_Dream_
  • Blue_Dream_
  • 2012-12-04 13:15:12
  • 6413

iPhone 代码签名 (code signing) 以及解析、屏蔽

iphone代码签名iphone 2.0 firmware 需要CHECK每个应用程序的签名,如果不通过,就会自动KILL.由于校验机制做到了内核中很多地方,简单的给内核打补丁很难解决. 1. cod...
  • linkai5696
  • linkai5696
  • 2010-10-06 22:37:00
  • 15957

Mac 下生成keystore以及获得数字签名

生成keystore 首先打开终端(在搜索里面搜索Te即可出来)(最好获得管理员权限) 然后输入  cd /Library/Java/Home/bin/ 然后这步很关键,由于我们用的...
  • h9911
  • h9911
  • 2015-05-15 11:13:21
  • 2525

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 simila...
  • menuconfig
  • menuconfig
  • 2015-10-26 17:20:39
  • 2879

WinXP+Mac OS X+Linux的多操作系统安装

在一台PC上,同时安装Windows XP、Mac OS X,甚至Fedora Linux等多个操作系统。  我的总体思路就是,将WinXP的启动管理器(NT Loader)作为默认的启动管理器,其他...
  • menuconfig
  • menuconfig
  • 2007-09-26 11:56:00
  • 499

Mysql出现”Cannot proceed because system tables used by Event Scheduler were found damaged at server st

在用Navicat 导出mysql数据库的时候出现 “Cannot proceed because system tables used by Event Scheduler were found d...
  • zljblue
  • zljblue
  • 2011-11-29 09:03:06
  • 3826
收藏助手
不良信息举报
您举报文章:codesign_allocate helper tool cannot be found or used
举报原因:
原因补充:

(最多只允许输入30个字)