dyld: Library not loaded for (xcrun altool) - xcode

I use xcrun altool command to connect app store. But the command always fails with below errors.
Environment:-
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.7
BuildVersion: 19H1922
$ xcodebuild -version
Xcode 11.6
Build version 11E708
$ xcode-select -v
xcode-select version 2373.
$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
$ xcrun --version
xcrun version 50.
I'm getting this error when trying to run xcrun altool on terminal.
Error:-
$ xcrun altool
dyld: Library not loaded: #rpath/ITunesConnectFoundation.framework/Versions/A/ITunesConnectFoundation
Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/altool
Reason: image not found
Abort trap: 6
The above command expected output would be something like below.
Error: code -1003 (No command was specified. Unable to run altool.)
How am I able to resolve this issue? Any advice is appreciated

First thing first, altool is deprecating, consider moving to notarytool as soon as possible. See Apple Doc
And both your Xcode version and your macOS version are far too old, my Xcode is 13.4.1 already. So I doubt whether App Store can accept connections from your Xcode version.
For your question, if you want a quick fix, just upgrade your macOS and the Xcode app. Or you can check whether your framework is missing at: /Applications/Xcode.app/Contents/SharedFrameworks/ITunesConnectFoundation.framework, may be a reinstall of your current Xcode version.

Related

When I try to run "xcrun usdz_convert" I get an error

I updated to macOS Catalina 10.15 and Xcode 11.0. Now this command is not running now:
xcrun usdz_convert
I get this error even though I've updated both $PATH and $PYHONPATH variables:
xcrun: error: unable to find utility "usdz_convert", not a developer tool or in PATH
Is there any fix for this yet?
In macOS Catalina 10.15.5 with Xcode 11 installed, or higher macOS with Xcode 12 or Xcode 13 installed, you need to use a new USDZ converter command in command line interface:
usdzconvert file.fbx
But before using this command check if USDPython Tools is installed.
For more info, please read this SO post.

Installing brew on Mac OS 10.12 getting xcode license agreement error

I am trying to install Homebrew on Mac 10.12 with the command:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
On running this, I am getting an error:
You have not agreed to the Xcode license.
Before running the installer again please agree to the license by opening
Xcode.app or running:
sudo xcodebuild -license
So I run sudo xcodebuild -license command then again got another error which is:
dyld: Library not loaded: #rpath/DVTFoundation.framework/Versions/A/DVTFoundation
Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
Reason: no suitable image found. Did find:
/Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTFoundation.framework/Versions/A/DVTFoundation: cannot load '/Applications/Xcode.app/Contents/Developer/usr/bin/../../../SharedFrameworks/DVTFoundation.framework/Versions/A/DVTFoundation' because Objective-C garbage collection is not supported
Please review and agree to the software license agreements!
I looked into this error also but no luck. While looking into this, I tried to reinstall xcode with the command:
xcode-select --install
Then I check for xcode installation by:
/usr/bin/xcode-select -print-path
The path printed, which seems to be correct, is:
/Applications/Xcode.app/Contents/Developer
Now can please somebody help me in accepting license agreement for xcode? This is where I am stuck and not able to move forward. Any suggestions or my error correction will be commendable.
If you have OSX 10.12 then xcode version 4.4.2 will not work with that in either way by a terminal or GUI. First try to update your xcode with the compatible version. Xcode 8 will be supported with OSX 10.11 and above.

Command Line Tools bash (git) not working - macOS Sierra final release candidate

I have just upgraded from OS X 10.11 "El Capitan" to 10.12: "Sierra", and when I try to access git commands inside a terminal, I get the following error:
xcrun: error: invalid active developer path
(/Library/Developer/CommandLineTools), missing xcrun at:
/Library/Developer/CommandLineTools/usr/bin/xcrun
Please help me if anyone have solution.
Re-install Xcode developer tools
xcode-select --install
I fixed this issue by downloading and installing the 'Command Line Tools (macOS sierra) for Xcode 8' package from Apple Developer Downloads.
Be sure to select Command Line Tools (macOS 10.12) for Xcode 8 and not the one for 8.1 beta unless you have Xcode 8.1 beta installed.
I just recently upgraded to macOS High Sierra Version 10.13.3 and has existing xcode. My git command lines have the same issue. "$xcode-select --install" works perfectly for me.
Had same problem and with putting the git's path into profile directly it will not ask the xcode anymore (if you dont need to use xcode).
download the git, https://git-scm.com/download/mac and install it.
in your profile add to path, i.e. export PATH=$PATH:/usr/bin (mine git is in /usr/bin).
open new terminal.
Alone - xcode-select --install did not work for me.
Had to do all 3 steps:
Download X-code from app store (if not present in Applications folder)
$xcode-select --install
a. May need to update after install using softwareupdate in command line. $sudo softwareupdate -i "Command Line Tools (macOS High Sierra version 10.13) for Xcode-9.1"
$sudo xcodebuild -license

Mac terminal returns "xcrun: error: unable to exec Xcode native xcrun (Exec format error)."

Mac OS X V. 10.9.4 2.4 GHz 2 GB RAM
Im trying to use Git through my mac terminal and it keeps returning this error every time I submit a git command: "xcrun: error: unable to exec Xcode native xcrun (Exec format error).".
I already installed git and github in my mac. Im somehow new to programming I i don't really understand whats causing this error. Its getting very frustrating.
The following works for me:
sudo xcode-select --reset
The GUI equivalent of this is to log into the machine, open Xcode, go to preferences, locations, and set the active command line tools version of xcode
I was getting a similar xcrun: error: unable to exec Xcode native xcrun (Not a directory). on my mac which is managed by a central admin. I had to run my command with sudo.

Xcode 4.3.2 unable to find its own include files

I am trying to build dtrace on Mac OS X 10.7.3 with Xcode 4.3.2. However, running xcodebuild gives me following errors.
~/dtrace-90/libelf/ar.c:34:16: error: ar.h: No such file or directory
~/dtrace-90/libelf/ar.c:35:20: error: stdlib.h: No such file or directory
Why is xcodebuild failing to find it own standard header files?
I have done: sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Thanks!
I finally figured it out. I installed "Command Line Tools for Xcode" and things now work :-)

Resources