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? :)
5 thoughts on “How to Fix “Can’t Find Xcode” When Installing Unreal Engine”
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?
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?