This short guide explains how to resolve the error “Can’t find Xcode install for Metal compiler. Please install Xcode and run Xcode.app to accept license or ensure active developer directory is set to current Xcode installation using xcode-select” when trying to install Unreal Engine on your Mac.
Fortunately the fix is very easy, although it does involve a fairly large download (12+GB). Just follow these few steps –
- Open the macOS App Store and search for Xcode. Once you find it, click the Get button to start the installation process.
- Once the installation has completed, launch Xcode and accept the terms of the License Agreement. Then quit Xcode.
- Now open a Terminal from your Applications -> Utilities folder and issue the command:
- You’ll be prompted to enter your password before the command will execute. Once it has, exit out of the Terminal.
- Now open UE again.
- This time it will launch without the “Can’t find Xcode” error and start to compile various parts of the app, which will take a moment or two. Otherwise, you’re done!
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
While you’re here (or waiting for Xcode to finish downloading!) why not check out some of our other Mac tutorials, tips and tricks? :)
Thanks, it worked!
Might have solved the Xcode issue myself. Found the xcodereleases.com page (after a lot of fruitless web searches) and a download of Xcode 14.0.1 (suitable for Monterey 12.5+) is due to finish soon. Might have to go to bed before I try to install it, as it’s 1am here!
All was going well until I tried to instal Xcode from the App Store.
Can’t be installed because “macOS 13 or later required”. Which means, in effect, that Unreal Engine 5.2 cannot run on Monterey, only Ventura. Unless anyone knows an another workaround.
Wow, thank you. Instant fix.
After your step 3 I get the following error:
xcode-select: error: invalid developer directory ‘/Applications/Xcode.app/Contents/Developer’
How do I solve this? Thanks.
Nailed it, tx
Hey Thx for the info! Can i uninstall xcode after editing the code? Or will the change be lost?
Pete –
I’m going to say probably it can be done, sounds like something that someone would do – but I have no idea how one might go about doing it. Sorry :(
Can you install a smaller version of XCODE? I read you can install one which is 10% of the original size. Do you know how to do that?