Try the following command:
locate codesign_allocate
Note. You may need to run this command and wait a couple of minutes if your local database is not updated:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Then look at all the points where codesign_allocate exists. On my system, it appears in the following places:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate /Library/Developer/CommandLineTools/usr/bin/codesign_allocate /usr/bin/codesign_allocate
Then make sure that at least one of them is on your $PATH .
echo $PATH | tr : '\n'
On my system, /usr/bin is on my $PATH , so Xcode finds it just fine. If codesign_allocate not available on your $PATH , you have two options:
Add it to your path. That is, edit your ~/.bashrc and add this line to the end (note that you can use any path in which the code-name of the command exists. The path I use is just for illustration):
export PATH=$PATH:/Library/Developer/CommandLineTools/usr/bin/
Create a symlink to the command line tools somewhere in the directory of your path:
sudo ln -s /Library/Developer/CommandLineTools/usr/bin/* /usr/bin/
Hope this helps! Please note that when installing a new version of Xcode, you can return to it and make sure that you are using the correct paths. Assuming you are installing previous versions of Xcode, you should be fine, but there is something to keep in mind.
Sandy chapman
source share