Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set active developer directory with ‘xcode-select’ for Qt installation?

Tags:

xcode

macos

qt

I'm trying to install the latest version of Qt for mac (https://www.qt.io/). But when I try to install I get an error.

You need to install Xcode http://developer.apple.com/xcode. If already installed, then set active developer directory with ‘xcode-select’.

I've now installed xcode 7.3.1, and then ran the following in terminal:

sudo xcode-select -switch /Applications/Xcode.app

But I'm still running into the same error (see screenshot).

enter image description here

Can anyone advise how I might troubleshoot this?

like image 808
tim_xyz Avatar asked Jul 05 '16 06:07

tim_xyz


People also ask

What is Xcode select in Mac?

You can install the Command Line Tools package by running the xcode-select --install command. Note: macOS comes bundled with xcode-select , a command-line tool that is installed in /usr/bin . It allows you to manage the active developer directory for Xcode and other BSD development tools.

How do I find Xcode path on Mac?

Start Xcode on the Mac. Choose Preferences from the Xcode menu. In the General window, click the Locations tab. On the Location window, check that the Command Line Tools option shows the Xcode version (with which the Command Line Tools were installed).


1 Answers

This fixed my error.

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

It came from the answer here. https://stackoverflow.com/a/17980786/2009221

The first time I clicked OK the error reappeared. The second time it was accepted and the installation continued.

like image 104
cstarcher Avatar answered Oct 20 '22 11:10

cstarcher