Mac : Ports broken after El Capitan upgrade

By | November 2, 2015

Mostly as usual, MacPorts have issues after Mac OSX upgrade. In my particular case it was after upgrading from Yosemite 10.10 to El Capitan 10.11.

After issuing the following update command :

The following error showed up :

Error: Error installing new MacPorts base: command execution failed
Please run port -v selfupdate' for details.
Error: /opt/local/bin/port: port selfupdate failed: Error installing new MacPorts base: command execution failed

So I end up using the suggested command :

Then I have remarked the following :

checking whether the C compiler works... no
configure: error: in
configure: error: C compiler cannot create executables

This tell me something is wrong with Xcode, so let’s just use the following command to fix this matter :

Then let’s try to upgrade the outdated packages :

Everything should be back to normal now.

NOTE : Down the road, if you cannot get the upgrade command working in the end and you’ve followed all these steps, you may try to upgrade the MacPort package directly by downloading the installer at