High Sierra Update: If you are looking for instructions on how to manually install MacPorts onto the High Sierra GM release, check here: Installing MacPorts on MacOS “High Sierra”
Update: MacPorts has released their official El Capitan installer. You should probably use it instead. 🙂
Update: Since people are ignoring my above comment, I have updated the below instructions to reflect the version changes reported by Chrisp in the comments.
Another year, another OS X update. If you are like me, you’ve weaseled a copy of the OS X 10.11 ‘El Capitan’ Gold Master installer, and you have started checking to see how much of your software is going to break if and when you install. Given the issues I’ve had in the past, MacPorts is the very first thing I test. 🙂
The first thing I noticed is that there is no El Capitan installer for MacPorts, and the Yosemite installer will not run on OS X 10.11. So, we are back to compiling it ourselves. Fortunately, this goes pretty smoothly.
The first caveat is that in addition to needing access to OS X 10.11 ‘El Capitan’ , you will need a copy of Xcode 7 (beta, RC, etc). You won’t be able to compile MacPorts for El Capitan with Xcode 6 because of changes to one or more of the header files that ship with the OS X 10.11.
The second caveat is that I did a clean install of OS X 10.11 ‘El Capitan’, so my instructions may not adequately deal with any cruft left over by previous installs. If you have an upgrade issue, please comment here and I’ll do my best to help you out and improve the instructions. You may want to follow the MacPorts uninstall instructions before starting the below steps.
- Install OS X 10.11 ‘El Capitan’
- Install Xcode 7
- Launch Xcode:
- Agree to the license.
- Let it install the extra components it says it needs.
- Quit xcode.
- Open a terminal window:
curl -O https://distfiles.macports.org/MacPorts/MacPorts-2.3.4.tar.gz
tar xzvf MacPorts-2.3.4.tar.gz
make && make install
echo 'export PATH=/opt/local/bin:/opt/local/sbin:$PATH' >> ~/.profile
port -v selfupdate
At this point, you should be ready to start reinstalling your ports! Wee!
If you see this error at step 4-10:
checking for Apple Foundation library... no configure: WARNING: GNUSTEP_SYSTEM_ROOT is not defined in your environment, preventing the use of GNUstep's Foundation library configure: error: Could not find a working Foundation implementation
It means you either have not installed Xcode 7 GM, or that you are running Xcode 7 Beta. Xcode 6 doesn’t know how to handle the changes to /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h that happened with El Capitan. The configure script is able to find the header file, but the test compile fails so it reports that the Apple Foundation library isn’t there.
If you are running Xcode Beta, you can get around this by using the following command in the shell you opened above, and then going back to step 4-10: (Thank you SadDigger for the comment on Reddit!)
xcode-select -s /Applications/Xcode-beta.app
Update 2015-09-15 11:06AM – Fixed a typo in instruction 4-3 where WordPress was converting a double-hyphen into an extended hyphen. I have also updated it to the latest version of MacPorts, so that the final just updates the ports rather than rebuilding the whole thing. Sorry about that!
Comments are closed.