Developer Forums relocated!

Need help with Apple Developer tools and technologies? Want to share information with other developers and Apple engineers? Visit Developer Forums at Apple.

xcode cli does not install to /Library/Developer/CommandLineTools

On a newly formatted system with Ventura 13.5.1. When I run

xcode-select --install 

everything looks fine and it goes through the install process without any errors. However, after install there is nothing in /Library/Developer, in fact, there isn't a Developer folder. No idea where it installs to. I tried install it by downloading the .dmg file from Apple and same results. When I go into software update, it does have an update for CLI but again, after installing, still nothing in /Library/Developer/CommandLineTools and the update is still there. I'm not sure where to find where the cli was installed to? This is also causing Homebrew install to fail b/c it wants the cli in /Library/Developer/CommandLineTools and it fails when it tries to switch to that dir. I also tried installing Xcode itself, that got me the tools like git but again, Homebrew install fails b/c there's still nothing in /Library/Developer/CommandLineTools. Any suggestions?

Posted on Sep 6, 2023 12:57 AM

Reply

Similar questions

4 replies

Sep 6, 2023 1:34 PM in response to freejunk

To be clear it does have Developer folder but no CommandLineTools folder no matter how I install it. I ended up installing Xcode and copying the Developer folder there over to satisfy homebrew install. Not sure how long that patch work will hold up.


I still don't know why it won't install the CommandLineTools folder

Sep 6, 2023 4:35 AM in response to freejunk

If homebrew does not find the Xcode Command Line Tools, it will install them for you. That is my own experience. I removed and just installed the Command Line Tools for Xcode 14.3.1 two days ago and it most certainly installed correctly in /Library/Developer/CommandLineTools directory.


You should not be installing beta Command Line Tools for Xcode 15 in a production operating system (13.5.1), if that is the case.


Enter this command:


xcode-select --print-path


It should show /Library/Developer/CommandLineTools. If it shows a path into the Xcode.app, then do the following:


sudo xcode-select -s /Library/Developer/CommandLineTools


see also: man xcode-select



Sep 6, 2023 8:54 AM in response to VikingOSX

Thanks but the problem is that CLI isn't actually installed for some reason after the installation runs. If I run

xcode-select --print-path

after I run the installer, I get the error

xcode-select: error: unable to get active developer directory

which tells me that the CLI wasn't installed properly. However, I get no error or anything like that during install.

Sep 6, 2023 9:38 AM in response to freejunk

I have never encountered the issue with a missing /Library/Developer folder. The com.apple.pkg.CLTools_SDK_macOS13 package shows the following (partial) installation pattern:


Library
Library/Developer
Library/Developer/CommandLineTools
Library/Developer/CommandLineTools/SDKs
Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk


and I assume that if the Developer folder were missing that the package installer would simply create it and continue with the installation.


The fact that you are not receiving any CLTools installation errors is curious, and I don't have an explanation for that because even without the CommandLine Tools installation, Xcode would create a /Library/Developer/Xcode folder on its own.


I have no explanation for your current situation, nor any solution.


xcode cli does not install to /Library/Developer/CommandLineTools

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.