Another year, another OS X update. (Yes, I do copy a fair chunk of the text from previous year’s posts.) I assume you are here because you downloaded the Mojave Beta/GM from Apple, and were disappointed that there isn’t a MacPorts installer yet. While I am sure they will release it soon, perhaps we can get you over the hump so you can beat up Mojave before the official drop date. If you are comfortable compiling software by hand, we should be able to get thru this easy-peasy.
I am doing this on a clean install of Mojave. If you are attempting an upgrade from any previous version, your process may vary in unexpected ways. If you did an upgrade install, you will want to make sure you’ve downloaded the latest version of Xcode, and you should probably follow the MacPorts uninstall instructions so you have less cruft around that could interfere with the process. If you have an upgrade issue, please comment here and I’ll do my best to help you out and improve the instructions.
This is my first pass at getting it running. I’m going to share all my steps. One or two things I do might be unnecessary, and could be removed later if I refine the process; but I promise I wouldn’t have hit the Publish button if the overall process didn’t work.
- Install MacOS “Mojave”
- Connect to the internet
- Install Xcode 10 from the App Store.
- Launch Xcode:
- Agree to the license.
- Let it install the extra components it says it needs.
- Quit xcode.
- Open a terminal window:
- sudo xcode-select –install
- When the pop-up launches, install the command line tools.
- cd ~/Desktop
- mkdir macports
- cd macports
- curl -O https://distfiles.macports.org/MacPorts/MacPorts-2.5.3.tar.gz
- tar -xzvf MacPorts-2.5.3.tar.gz
- cd MacPorts-2.5.3
- sudo make install
- echo ‘export PATH=/opt/local/bin:/opt/local/sbin:$PATH’ >> ~/.profile
- source ~/.profile
- sudo port -v selfupdate
There’s one extra step I find worth doing that isn’t strictly required for installing the MacPort installer tools. I find it useful to install Java on my machine before I install any ports. Otherwise you will be plagued with pop-up windows recommending you install Java while compiling ports like rsync.
At this point, you should be ready to start reinstalling your ports! Wee!
After manually installing MacPorts with the above instructions I was able to install rsync, wget, git, python27, which are my usual first validation tests. Those packages, combined with their dependencies, result in around 75 installed packages; which does a pretty good job of verifying MacPorts is working. 🙂
Updated 2018/10/02 – Fixed the smart-quote thing, so #17 should work now without needed to have the quotes tweaked.