![]() Now, sudo xcode-select -p returns /Library/Developer/CommandLineTools/. But xcode-select -install said the command line tools were already installed. sudo rm -rf /Applications/Xcode.appĭeleted version 8 of the tools. Xcode-select -p returned /Applications/Xcode.app/Contents/Developer, and clang -version reported an installation directory under there. xcode-select -r and rebooting didn't solve this issue. But clang -version still gave 8.0.0 as the version number. The App Store didn't suggest this upgrade, and neither did softwareupdate -list. I wanted to upgrade the command line tools from version 8 to 9. Hopefully it'll help someone (and it'll surely help me next time I run into the same issue). I'm going to answer a slightly different question here, because this question came up when I searched for a solution to my problem. Then, run the install command (as shown by Brendan Shanks) with what you copied inside quotes: softwareupdate -i "Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.1" In the above case, you would copy: Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.1 Copy that entire line (except the asterisk.). * Command Line Tools (macOS High Sierra version 10.13) for Xcode-10.1Ĭommand Line Tools (macOS High Sierra version 10.13) for Xcode (10.1), 190584K įind the bullet that refers to the Xcode command line tools. Software Update found the following new or updated software: When it's done, you'll see a bulleted (with an asterisk) output like this: $ softwareupdate -list This will probably take a couple of minutes. Installer -allowUntrusted -pkg " $(find $TMPMOUNT -name '*.For future travelers, here's a version-agnostic approach. # to sign the downloaded command line tools. # command to accomodate for now-expired certificates used # The "-allowUntrusted" flag has been added to the installer Hdiutil attach " $TOOLS " -mountpoint " $TMPMOUNT " -nobrowse TMPMOUNT= `/usr/bin/mktemp -d /tmp/clitools.XXXX ` # instead from public download URLs, which can be found in the dvtdownloadableindex: ![]() ![]() # on 10.7/10.8, instead of using the software update feed, the command line tools are downloaded # Installing the latest Xcode command line tools on 10.7.x and 10.8.x Softwareupdate -i " $cmd_line_tools " –verbose # as that should be the latest Xcode command line tool installer.Ĭmd_line_tools_output= " $cmd_line_tools "Ĭmd_line_tools= $(printf " $cmd_line_tools_output " | tail -1 ) # Check to see if the softwareupdate tool has returned more than one Xcode Osx_vers= $(sw_vers -productVersion | awk -F ". # Installing the Xcode command line tools on 10.7.x or higher The fix was to add the following section to the script: For more details, please see below the jump. But when it happened this time, I decided to update the script to hopefully fix this issue once and for all. The result is that the script ends without installing anything.Īpple usually removes the previous version from the Software Update feed within a few days, which allows the script to work normally again. When more than one is available, the script isn’t able to correctly identify which Xcode Command Line Tools it should be installing. The original script was written with the assumption that there would only be one qualifying Xcode Command Line Tools install option available at any one time. Apple would sometimes have both the latest available Xcode Command Line Tools installer and the just-previous version available on Apple’s Software Update feed. ![]() ![]() However, starting with macOS Sierra and continuing on with macOS High Sierra, I occasionally ran into an odd problem. A while back, I developed a script that will download and install the Xcode Command Line Tools on Macs running 10.7.x and higher. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |