Cannot install Command Line Developer Tools on OS X Mavericks - xcode

When I run xcode-select --install in the Terminal, I get the prompt to install the Developer Tools as desired (and as described in this post). But when I run the installation, the process stops at around 50% with a message along the lines of:
Could not install the software because the update server cannot be reached.
My internet connection works fine and I do not think that Apple's servers can be down for more than a couple of hours so I looked at the Console. This is what I found there:
23.02.14 23:25:38,513 mds[63]: (Normal) Volume: volume:0x7fdb79016000 ********** Bootstrapped Creating a default store:0 SpotLoc:(null) SpotVerLoc:(null) occlude:0 /Volumes/Recovery HD
23.02.14 23:25:38,538 fseventsd[73]: Logging disabled completely for device:1: /Volumes/Recovery HD
23.02.14 23:25:38,000 kernel[0]: hfs: unmount initiated on Recovery HD on device disk0s3
Next I tried to install the Developer Tools from http://developer.apple.com/downloads/ and the installer said the installation was successful. Except that the Developer Tools still don't work.
xcode-select -p
returns
/Applications/Xcode.app/Contents/Developer
What is the issue here?
UPDATE
It looks like the .dmg install from http://developer.apple.com/downloads/ was actually successful. The reason I wanted to install the Deveolper Tools in the first place was because I wanted to install the Python Imaging Library with PIP but failed and read somewhere that this was due to the lack of the Command Line Developer Tools. I found a solution to this problem here. The question of my thread is not really resolved though (why the misleading message when I try to install the Developer Tools?) which is why I do not mark the question as answered for now.

Related

Installing Xcode command line tools

I performed a fresh install of macOS Mojave 10.14. Immediately after that I installed Xcode Version 10.0 (10A255) from the Mac App Store.
Now, I wish to install Homebrew which requires Xcode command line tools to be installed. My understanding is that installing Xcode also installs the command line tools. Or not?
As per this answer, I checked if the command line tools are installed by running:
xcode-select -p
which printed the path for the Developer directory as follows:
/Applications/Xcode.app/Contents/Developer
As suggested in the answer, I also verified the return value by running:
echo $?
which retuned 0.
I also ran, gcc and make and bash was able to locate and execute them.
Thus far I am convinced that the Xcode command line tools are installed. Now when I execute:
xcode-select --install
I get this alert:
What's the probable reason for this disparity? Will this install Xcode command line tools twice? Or overwrite the existing installation?
As I understand, Xcode command line tools can be installed without installing Xcode. Also, from my previous experience, if the command line tools aren't installed separately from Xcode (by running xcode-select --install), they are not detected by Homebrew, i.e. when running brew config, the value for CLT: is shown as N/A.
Here's the complete picture (pardon the pun):
Although I am talking in context of macOS Mojave, the question remains the same with regard to previous versions of macOS.
What is the advisable approach to take here?
Note: After installing Xcode, I launched it, accepted license agreement and let it finish its run of installing additional tools (which is a one time activity).
Following worked for me, only command line tool can also me installed.
After you updated to Mojave 10.14 Go to https://developer.apple.com/download/more/ search for "command line" then
Download "Command line tool for MacOS 10.14"
Once dmg is downloaded install the package.
Verify package installation

Xcode - Install additional required components using command line

I recently got a used Mac with Mountain Lion on it. I don't know of the admin password or anything, but I do know how to run a command line.
So here's what I am stuck on:
When I click install, it asks me for my username and password (which I don't know).
I want to install this via single-user mode (Cmd+S on Startup), which I accepted the license using it.
Do you guys know how I could achieve this?
At least on Xcode 9.2, you could use:
sudo xcodebuild -runFirstLaunch
to accept the agreement and install additional components.
Resolved this issue using the below commands, it is on OS El Capitan and Xcode beta 7.2
sudo /Applications/Xcode-beta.app/Contents/Developer/usr/bin/xcodebuild -license accept
sudo installer -pkg /Applications/Xcode-beta.app/Contents/Resources/Packages/MobileDevice.pkg -target /
sudo installer -pkg /Applications/Xcode-beta.app/Contents/Resources/Packages/MobileDeviceDevelopment.pkg -target /
Change the Xcode-beta.app path to your own, and you would need sudo(admin) access. Close your Xcode and open again.
I know this is a looooooong time after the original post, but just in case anyone else finds this (as I did) while trying to install Xcode 8.2.1 on El Capitan (10.11.6)…
I had all the same problems listed here – long delay for launch, then asking for additional tools to be installed, only to fail. The command line tools install also failed. I tried the various command line solutions listed, but none worked.
However, upon checking the log I saw that I was getting errors with certificates. On a hunch, I decided to put the system clock back to 20 December 2016 - voila, installs work like magic.
Put the clock back to today (30 October 2019) and still seems to work.
The commandline way to install required components is:
/Applications/Xcode.app/Contents/MacOS/Xcode -installComponents
Here's what I ended up doing.
I went into recovery mode (CMD+R on startup), then to Terminal. I typed in
resetpassword
which then brought up a dialog of where I can select the user and set the password.
I then set the root password. Now when I can enter an admin password, I type in "root" and the password I set.
I got Xcode to load finally!
Xcode 5.1.1 have a new argument:
> xcode -installComponents

Failed to install command line tools on OSX Mavericks

I tried to install the command line tools on Mavericks following the steps in this very useful post
> xcode-select --install
but after a few short seconds I get the message
This seems wrong. Does anyone know how to solve this problem?
Whenever I navigate to the page that #Nikos M. is suggesting
I get this message
I followed #Rich's suggestion and I was able to download the package and install it which I wasn't able to do before, but I've found that I still don't have access to a lot of the commands that I should like arp or diskutil just to name two that I've encountered recently.
Install them from here. You must be a registered developer.
Other solution is: in xcode click Xcode>Open Developer Tool>More Developer Tools
This should then take you to a link which will require a developer Apple ID sign in. From there, you'll be redirected after authenticating to https://developer.apple.com/download/more/ where you can manually download and install the Command Line Tools.
The tools are still free, but xcode-select --install is no longer supported.
To install the latest command-line developer tools from https://developer.apple.com,
Applications -> App Store -> Search -> XCode -> Install ... install
XCode if you don't have it.
Open XCode and close any pop-ups
Go to the Xcode menu > Open Developer Tool > More Developer Tools... this opens the correct website.
Find the newest version, download the dmg and install the package. The filename you're looking for is similar to "Command Line Tools (OS X 10.9).pkg"
I had this problem for months and finally found the solution.
The problem was: I had installed it before and removed it manually.
(I had problems with the bundled git. It was not the smartest move to do this.)
What i didn't remove were the files
/var/db/receipts/com.apple.pkg.CLTools_Executables.bom
/var/db/receipts/com.apple.pkg.CLTools_Executables.plist
Delete them, run xcode-select --install -> no error anymore
At least it worked for me. Hope it is helpful for somebody.
I get that "Your Session has Expired" message when I try to download from within the Chrome browser. If I navigate to the site with Safari and sign in with my developer credentials then the Command Line Tools dmg downloads without a problem. I do not have a paid developer account either, btw.
You can download your Command Line Tools from daw.apple.com, but try it from Safari instead of Chrome.
I tried it with Chrome for a few hours and apple would not recognize my id/password (it is the same as your AppleID). It required me to change my password after each third try, which was challenging because it would not let you use any password you've used in the last three years.
Signing in via Safari gave me no problems.
The file you are going to look for is Command Line Tools (OS X Mavericks) for Xcode - Late October
If your terminal still says you need to install command line tools, it may be an issue with gcc-4.2. I was able to confirm that was the issue by following my terminal message after I ran "bundle install" on my rails app. If this is your issue, you will do the following follow Housen's solution here. Best of luck
I spent the day trying to solve this problem. I believe the error messages are just confused about installing Xcode. The real problem I had was a need to update gcc compiler. This happened to me because I skipped Mountain Lion, where that occurred. This blog post was very helpful.
I solved it by open XCode UI, then adding my apple account
Xcode -> Preference -> Add my APPLE ID account
Then repeat the xcode-select --install
Try to install the command line tools following
Error Message "Xcode alone is not sufficient on Sierra"
brew seems checks if the command line tools installed in this path:
/Library/Developer/CommandLineTools
My case is: I tried to install brew on my new mac. After I installed Xcode, there was nothing in the above path but the command line tools were somehow installed to another location. (xcode-select -p tell me it was /Applications/Xcode.app/Contents/Developer)
The way in stackoverflow can install the command line tools to
/Library/Developer/CommandLineTools
Now I got brew working. But I am not sure if it is the best solution as there should be two copies of command line tools on my machine using this method.

Is it possible to use MacPorts with ONLY Xcode 4.3 CLI tools installed?

I understand that starting with Xcode 4.3 the CLI tools are a separate installation and that caused many issues with existing MacPorts installations upon upgrade. This question is not about that problem. With a brand new rMBP 15.4", I attempted to install only the CLI tools via download from the Apple Developer site. Not only did MacPorts fail to find Xcode, but xcodebuilder itself failed to execute (simply hangs...). I tried many iterations of using xcode-select to point to the CLI binaries, but I couldn't get either MacPorts or just the CLI binaries to work.
Is it simply not possible to only install (the wonderfully tidy and SSD-friendly) CLI tools and get MacPorts to work? I was not able to find anybody that specifically confirmed or denied this in several searches here and on Google in general. With a 128GB SSD, every GB counts... and the 4+GB Xcode install (99% of which I don't need) is a waste of space. Is there something in the proper Xcode install that MacPorts requires?

Unknown error when creating packages with pkgbuild

I followed several tutorials-which all appeared to say the same thing-on how to create deployable flat-packages (.pkg) using the OS X system provided pkgbuild tool. The packages was always generated just fine. They did, however, not want to be installed.
Running the graphical Apple Installer or the command line interface installer aborted the installation early on giving an generic “Unknown error” after prompting for higher permissions.
Hours later after closer investigation I discovered that I could not install other packages either. Not even updates and new installations from the OS X App Store. Why could I not install my own nor any other packages? What was going on?
The installer daemon service itself is unresponsive. Force quit the installed program from from the Activity Monitor, or from the command line with sudo killall installd.

Resources