codesign_allocate: error: unable to find utility “codesign_allocate”, not a developer tool or in PATH

前端 未结 6 1664
野性不改
野性不改 2020-12-19 05:06

I upgraded my Mac to 10.10.3 and Xcode to 6.3.1 yesterday; today I can\'t use git, codesign_allocate....and more.

`sh: line 1: 18421 Abort trap:         


        
6条回答
  •  爱一瞬间的悲伤
    2020-12-19 06:00

    I struggled with this almost all afternoon and started to think it would be the end for me.

    Hopefully I found a solution that might help other people. I started to wonder after I saw this error again and again :

    sh: line 1: 18421 Abort trap: 6 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk -find codesign_allocate 2> /dev/null codesign_allocate: error: unable to find utility "codesign_allocate", not a developer tool or in PATH

    I took @sandy's answer and checked the different paths where I could find codesign_allocate. I got a pretty good hint after running both of these command:

    $ /usr/bin/codesign_allocate sh: line 1: 26890 Abort trap: 6 ...

    $ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate Usage: .../codesign_allocate -i input [-a ] [-A ]... -o output

    Thus I simply replaced my local /usr/bin/codesign_allocate with the one from xcode and that fixed all my problems.

    sudo cp -r /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /usr/bin/

    I hope this can help other people; good luck everybody.

提交回复
热议问题