1

In the past it used to be easy to install CommandLineTools without Xcode. Now I cannot get it to install correctly. Please note: this is not a development question but an installation of software question.

There are many discussions of similar issues, but none exactly what I am seeing.

A short answer to my question would be "it is no longer possible to run CommandLineTools unless full Xcode is installed". I am hoping that is not the case.

I have tried many variations on all the suggested steps, along with attempts at clean uninstallation and starting over. I have gleaned a lot of steps from the following sources:

And likely more pages that I did not record.

I have installed Xcode, uninstalled it, installed and uninstalled standalone CommandLineTools, used xcode-select --switch, and more, all in various combinations.

The result is that when full Xcode is not installed, when trying to run a command, I get the following error message or similar, depending upon the command:

xcode-select: error: tool 'opendiff' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance

With full Xcode, the commands work.

In many places in the threads mentioned above, people complain about having to have 6GB of unwanted code; this is no longer incorrect. The current version of Xcode is now 10GB.

My main use of the CommandLineTools is to support MacPorts. As a bonus I like opendiff in some cases where my main tools are farther out of reach.

Is there a solution to this issue?

EDIT: I see that Apple now provides a direct way of installed Command Lines Tools only as Command_Line_Tools_macOS_10.13_for_Xcode_9.4, but it is only for High Sierra. While I am still a hold out to the upgrade to HS, it will be only a very short time before I do this upgrade. Hoping that is the line of least resistance.

1

I don't think there's a solution since opendiff calls the GUI program FileMerge which ships with Xcode.

You would want to use another diff tool - perhaps the gnu tools from homebrew or my favorite paid diff tool that has a command line tool - ksdiff from Kaleidoscope.

It's a powerhouse of GUI diff goodness for when the command line options don't cut through the task you need done.

  • I have used the opendiff from Command Line Tools for years. And without Xcode. And there are many places on the web giving instructions on how to do such an installation without CommandLineToos. So the real question is have they recently broken that ability? – Jeffrey Simon Sep 22 '17 at 14:58
  • @JeffreySimon OK - the opendiff command line opens FileMerge for me and I don't see that on my Macs without Xcode, but perhaps I'm somehow in the wrong on that part. The part where I like Kaleidoscope a whole lot still remains. – bmike Jun 10 '18 at 14:07
1

You can try solution from here: Github script to install tools from Xcode 3.2.6

I used this to have FileMerge.app without Xcode and works even on High Sierra.

1

I spend over 3 hours fixing problem with osx 10.14

$ sudo -s
$ touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress;
PROD=$(softwareupdate -l |
  grep "\*.*Command Line" |
  head -n 1 | awk -F"*" '{print $2}' |
  sed -e 's/^ *//' |
  tr -d '\n')
softwareupdate -i "$PROD" --verbose;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .