I can't get MacPorts to work.

I am running Mac OS X Mountain Lion. I recently updated MacPorts by running "sudo port selfupdate", and it successfully updated the package list. When I tried to download a package I got this message:


Warning: xcodebuild exists but failed to execute

Warning: Xcode does not appear to be installed; most ports will likely fail to build.

---> Computing dependencies for lynxError: Unable to execute port: can't read "build.cmd": Failed to locate 'make' in path: '/opt/local/bin:/opt/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin' or at its MacPorts configuration time location, did you move it?


I have XCode installed on my computer. It's version 3.1.3 and located in /Developer/Applications. I can't tell if the problem is that XCode is out of date, or it's in the wrong directory. I know where I can find the make utility (there's a symbolic link to it in /Developer/usr/bin) so I can easily edit my .bashrc file to add that to $PATH. So my questions are:


1. What version of XCode do I need? The newest version only works on 10.9.4 or higher, so I can't get it. I will need an older version. Any pointers?


2. Do I actually need a newer version of XCode or can I fix this problem by just adding the path for make to $PATH?


3. What is build.cmd? Is this something that MacPorts needs make in order to read? I'm not familiar with the .cmd extension.

MacBook Pro, OS X Mountain Lion (10.8)

Posted on Sep 30, 2014 6:57 AM

Reply
2 replies

Oct 1, 2014 5:05 PM in response to Erentigionation

MacPorts has moved on from your ancient Xcode v3 implementation. Xcode no longer installs in the /Developer folder hierarchy, and now installs as a single application as /Applications/Xcode.app. Additionally, current MacPorts is now expecting current Apple compiler technology, now known as Command Line Tools (OS X Mountain Lion) for Xcode to be properly installed.


Xcode v5.1.1 is the latest release that remains compatible with Mountain Lion. The April 20, 2014 Command Line Tools (OS X Mountain Lion) are the last updates for this version of Xcode. After you sign-in with your Apple ID into your free developer account, you can download these tools from page 2 of the Other Downloads area.


You can remove Xcode 3.1.3 from /Developers and other areas of your Mac using the uninstall script(s) in /Developer/Library from root.


I would use the MacPorts removal process, followed by Xcode and command-line tools from above installation. Then confirm that you have met the MacPorts installation prerequisites, before a fresh install of MacPorts.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

I can't get MacPorts to work.

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