Installing MacPorts on OS X 10.11 ‘El Capitan’

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.

  1. Install OS X 10.11 ‘El Capitan’
  2. Install Xcode 7
  3. Launch Xcode:
    1. Agree to the license.
    2. Let it install the extra components it says it needs.
    3. Quit xcode.
  4. Open a terminal window:
    1. sudo bash
    2. export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
    3. xcode-select --install
    4. cd Desktop
    5. mkdir macports
    6. cd macports
    7. curl -O
    8. tar xzvf MacPorts-2.3.4.tar.gz
    9. cd MacPorts-2.3.4
    10. ./configure --enable-readline
    11. make && make install
    12. echo 'export PATH=/opt/local/bin:/opt/local/sbin:$PATH' >> ~/.profile
    13. source ~/.profile
    14. 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/

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!

The Importance of Monitoring SSL Certs

The certificate for this server is invalid. You might be connecting to a server that is pretending to be “” which could put your confidential information at risk.

As of  4:59 PM on 5/24/14, every Apple user is getting the same scary error.

Don’t worry, you are probably not the victim of a man in the middle attack.  It appears that the SSL cert for, which is hosted at Akamai, has expired.  This was probably due to a gap in the monitoring and management of the SSL certs provided to Akamai.

It is certainly possible that Akamai has been hacked, and a compromised SSL cert was installed.  Not likely, though.  To be safe, just hold off on any updates until Apple and Akamai get the cert updated.  Alternatively, you can download updates directly instead of using the App Store.  You can download all major updates here, and this server uses a different SSL endpoint that has a valid certificate:

Pro tip for Apple’s security team:  Even though lives at Akamai, you should set up SSL cert checks in Nagios for all  exposed HTTPS end-points that are in the domain.  These are the sorts of things you want to get notified about 60 days in advance.  In the unlikely event that Akamai has been hacked and the cert replaced, this type of monitoring would have immediately alerted you.  Win-win.

Both Apple and Akamai should have been monitoring this SSL cert.  I do not think anyone should lose their job over this. If anyone does lose their job over this, that would be a failure of management, not the person or team responsible for SSL certs.  I think this should be seen as an opportunity for improving monitoring and business processes.

I tried sending an email to to let them know they had a critical SSL cert that has expired.  My email received an error in response: “Your message to could not be delivered for the following reason: This group does not accept external messages.”  

Update:  I received a response from Apple’s Security Team.  They obviously resolved the expired SSL certificate, and they’ve addressed the bounce issue I reported.  Fairly promptly, for a holiday weekend.

iMac video glitches, and useless fixes

Several years ago I bought Mel an iMac. It was a 27″, top of the line, all the bells and whistles. I secretly replaced her existing 21″ iMac with the new one after she had gone to bed one night. It took her several pre-coffee minutes to realize something wasn’t quite the same the next morning. Hilarity ensued.

After two and three quarter years, the video started glitching. Little pink artifacts that would dance around the screen, especially after long sessions playing World of Warcraft. Apple Care to the rescue, we took it in. They replaced the video card, and all was well. For a few weeks. Then they came back. Took it in again. This time they said they were going to replace the motherboard. When we picked it up, they told us they had just replaced the screen instead. No worries, we took it home and it worked flawlessly. Right until the Apple Care expired. Then it started flaking out with the same glitches. Two very expensive repairs, had they not been covered under Apple Care, and it looked like we were going to have to foot the bill on the last option: the mother board replacement they had opted out of on the last repair.

We made an appointment. We hoped to plead that this was a recurring issue that hadn’t been previously fixed, and maybe we could get out of an expensive repair.

We had several days before our appointment, and I kept thinking about why the previous repairs had worked temporarily. It couldn’t be that they had replaced the correct parts, and yet the symptoms had gone away. A loose, and/or oxidizing, connection could explain it. I took apart the front display, and disconnected the data and power connectors on the LCD. After putting it back together, the video glitches are gone again. This may only last a few weeks or months, but now I know how to fix it for free.

The moral of the story? Don’t be afraid to take your stuff apart!