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 of)
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:
to accept the agreement and install additional components.
Xcode 5.1.1 have a new argument:
Resolved this issue using the below commands, it is on OS El Capitan and Xcode beta 7.2
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 (11.6)…
I had all the same problems listed here – long delay for lunch, 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.
Here's what I ended up doing. I went into recovery mode (CMD+R on startup), then to Terminal. I typed in
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!
The commandline way to install required components is: