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.
Related
I did these steps:
Updated to Mojave
Installed Xcode 10 beta3
Ran this command: sudo xcode-select -switch /Applications/Xcode-beta.app/
Now I'm trying to install node8:
brew install node#8
And it gives me this error:
Error: The Command Line Tools header package must be installed on Mojave.
The installer is located at: /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
Still, doing
install -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
does nothing, since there's no such file in my system. Where could I get it?
Go to /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg location and install package manually. And brew will start working.
I want to try and answer this question and also for those that come later that installed Mojave and had an older Xcode version installed. The process is the same minus that if you have Xcode 10, you don't need to install it again from my understanding.
The folder is hidden and was not accessible even with a sudo find command, however, I figured out that copying the absolute path and then pasting it in your browser address bar will give you the download and access to the folder that you need to fix brew install.
I posted a video here- https://youtu.be/GfnhSirTCGM that walks you thru part of my steps above. After you do the SDK headers download, its likely that unless you already are running Xcode 9.4, you will need to visit, https://developer.apple.com/download/more/ and look for Xcode 9.4 to install. Also grab the 10.14 command line tools as well. The lesson that should be learned here is that Apple calls it "Beta" for a reason and if you are a developer that knows the pains of setup, it is a bad idea. I hope that I was helpful! The last thing is, INSTALL XCODE THEN COMMAND LINE TOOLS-IN THAT ORDER OR IT ERRORS OUT! and then we do this all over again. Cheers!
It appears as though Apple has released a patch for the bug and it is available through the system preferences. 14 July 2018
Broken command line tools:
Xcode Location on the Apple developers website:
Location of command line tools:
Do not install Xcode from the Mac App Store because a different version is required!
Command line tools 10.14 update:
As of October 2018, the solution for making brew and brew install succeed is to:
install latest Xcode fom AppStore
run Xcode and install command line tools
add the line before to your profile or somethign similar
export CFLAGS="-I/usr/local/include -L/usr/local/lib -I$(brew --prefix openssl)/include -I$(xcrun --show-sdk-path)/usr/include"
No need to download Xcode manually, but you may want to remove the beta version if you installed it.
The magic part is at the end, where xcrun obtains the correct location of the SDK.
In terminal, you should first input the commands below
cd /Library/Developer/CommandLineTools/Packages
open .
you will open the directory on desktop,
then double click the pkg file to install it.
After I've installed Github Mac app on my macbook (running OSX Mavericks 10.9.2), I've tried to type git on the terminal, and a message appears and say:
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.
I've also already installed the "Command Line Tools" from Github Mac app preferences.
So, what is the problem?
Why I can not use the "git" terminal commands and Github Mac client app together?
I've search over the web for solutions, but anyone resolves my problem.
Try running xcode-select --install.
As far as I understand, the command line tools are compilers and other tools needed for development.
For background: prior to Xcode 5, you used to have to download Xcode and within Xcode's preferences choose 'Install Command Line Tools' (or use the command I listed above).
Edit: Corrects the install flag syntax
I have tried and tried (looked at many headings for this) and I still don't have an answer to my problem. I am trying to install the Pebble SDK 1.12 and install command line tools of Xcode 5.
Everytime I try xcode-select --install in terminal I get "Can't install software because it is not currently available in the Software Update server"
I have tried to reinstall Xcode and that didn't work.
When I got to Xcode-preferences-downloads there isn't a section for the command line tools.
I have also tried installing them from the Developer site but to no avail. The download looks correct and then I go to Xcode to see the preferences and the command line tools aren't listed.
Anything you all can suggest?
Using xcode-select --install in Terminal and choose install tools
On OS X 10.9, the Command Line Tools component no longer appears in the Preferences pane for Xcode 5, unlike on OS X 10.8. Also, the not currently available message appears to be a bug in OS X 10.9 when the currently installed Command Line Tools are already up-to-date. If you have a populated /usr/include directory and /usr/bin/cc --version gives you something, you're probably fine.
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
What is the easiest way to update Xcode on OSX?
I see this in the terminal:
$ brew install xxxxxxx
Warning: Your Xcode (4.3.3) is outdated
Please install Xcode 4.6.
But when I go to open up Xcode > Preferences > Downloads, it says there are no updates?
Open up App Store
Look in the top right for the updates section (may also be in lefthand column "Updates"..)
Find Xcode & click Update
softwareupdate --list see the list of outdated software.
softwareupdate --install --all update all outdated software.
softwareupdate --install <product name> update the software you named.
Sometime I don't see the Xcode update in Updates tab in AppStore
So I search Xcode in AppStore
Then click update and it update
If attempting to download via the App Store leaves you with a little grey spinner and nothing actually happening, then you can go to :
https://developer.apple.com/download/more/
log in with your Apple Developer ID, and the latest Xcode should be available as a .zip download.
In my case (Xcode 6.1, iOS 8.2) I did not see the update in AppStore.
I found Xcode 6.2 for download and pressed "Install".
Then, it installed and asked for the update (more than 2 Gb).
Xcode 6.2 works correctly with iOS 8.2 and iOS 8.1.2
Hopefully this tip will help somebody else...
xcode-select --install worked for me
Another best way to update and upgrade OSX development tools using command line is as follows:
Open terminal on OSX and type below commands. Try 'sudo' as prefix if you don't have admin privileges.
brew update
and for upgrading outdated tools and libraries use below command
brew upgrade
These will update all packages like node, rethinkDB and much more.
Also, softwareupdate --install --all this command also work best.
Important: Remove all outdated packages and free some space using the simple command.
brew cleanup
If you want the latest Beta, it will not be in the AppStore. Instead you have to login to https://developer.apple.com and download from there.
In my case I solved this "no updates" issue by accessing AppStore from the developers link:
https://developer.apple.com/download/release/
Apart, you might find this command useful: mas-cli-github
$ brew install mas
$ mas list
$ mas search Xcode
$ mas install <id>
$ mas upgrade <id>
I ran into this bugger too.
I was running an older version of Xcode (not compatible with ios 9.2) so I needed to update.
I spent hours on this and was constantly getting spinning wheel of death in the app store. Nothing worked. I tried CLI softwareupdate, updating OSX, everything.
I ultimately had to download AppZapper, then nuked XCode.
I went into the app store to download and it still didn't work. Then I rebooted.
And from here I could finally upgrade to a fresh version of xcode.
WARNING: AppZapper can delete all your data around Xcode as well, so be prepared to start from scratch on your profiles, keys, etc. Also per the other notes here, of course be ready for a 3-5 hour long downloading expedition...
You DO NOT need to upgrade Xcode.
Just open the file /usr/local/Homebrew/Library/Homebrew/extend/os/mac/diagnostic.rb ,
then remove this line check_xcode_minimum_version in the following function.
def fatal_build_from_source_checks
%w[
check_xcode_license_approved
check_xcode_minimum_version //<-- this one
check_clt_minimum_version
check_if_xcode_needs_clt_installed
].freeze
end
Then brew install should works fine.
I used the Command_Line_Tools_OS_X_10.XX_for_Xcode_7.2.dmg and therefore had to download the latest version from here.
Check https://xcodereleases.com/ where you can also download legacy versions.
For me it was >41GB for the update to start. ~/Library contains a lot of cached content for mail, browsers, etc...you can safely remove those. Remove big apps too, like iMovie..you can always install it back later