Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i install additional packages for Xcode on OSX Lion to allow MacPorts to work

When I try and install MacPorts it complains 'Xcode is not installed, or was installed with UNIX Development (10.5+) or Command Line Support (10.4) deselected.'

I do have Xcode installed from the Appstore so I guess I just have to install these extra parts but how ?

Ive read a couple of questions on Stack Overflow about this but I think the answers must be outdated as they do notmake sense for me, I do not have an Xcode dmg I can reinstall from, and I can't see anything useful in /Developer either, or any preferences within Xcode itself.

I only want Xcode for the purposes of using Macports so I'm not familiar with it.

like image 525
Paul Taylor Avatar asked Sep 16 '11 09:09

Paul Taylor


People also ask

How do I know if MacPorts is installed on my Mac?

Confirm that MacPorts is installed by typing "which port" and verifying that it returns /opt/local/bin/port. If not, see below on adding the MacPorts bin to your shell path.

How do I get Xcode to work on my Mac?

To install XcodeOpen the App Store on the Mac that will be your server, and search for Xcode. Download Xcode from the App Store. After your download is complete, launch Xcode in /Applications or Launchpad. If prompted, enter your administrator account credentials in order to configure Xcode.

Does MacPorts build from source?

Other package managers, MacPorts among them, pull source code from a server, compile it into a binary executable on your computer, and install it into the correct directories. The end result is the same: you have the software you want. The way they get there is different. There are advantages to both methods.


2 Answers

You probably got Xcode 4.1 from the Mac App Store. In that case, you haven't got Xcode 4.1 installed. However, you now have an Xcode installer in your Applications directory.

Spotlight should find it in any case.

like image 189
Jean-Denis Muys Avatar answered Oct 17 '22 23:10

Jean-Denis Muys


The command line tools aren't included in the default install of Xcode anymore. Goto the Xcode Preferences --> Downloads Pane --> click the Install button beside "Command Line Tools". If you don't have Xcode installed you can get the command line tools separately as explained here..

http://osxdaily.com/2012/07/06/install-gcc-without-xcode-in-mac-os-x/

like image 25
EddyGL Avatar answered Oct 17 '22 23:10

EddyGL