If you found this page looking for help compiling MacPorts for OS X 10.11 El Capitan, please check out this post.
FINAL UPDATE: 2013-10-26 - The Official MacPorts installer for Maverics has been released, so there is no longer a need to jump through hoops. Please visit the MacPorts Download page to get the official version.
If you are a bleeding edge lunatic who has installed Mavericks before the first patch release, you may have realized you can't install any new MacPorts. You can search ports, but nothing will install. No worries, I can help. 🙂
Note: These instructions have evolved a bit since they were first posted, prior to the official release. If you visited before and had problems, try again now. These instructions assume you have already installed Mavericks.
- Follow steps 1, 2 & 3 of the Migration page: https://trac.macports.org/wiki/Migration
- Follow the Uninstall instructions: https://www.macports.org/guide/chunked/installing.macports.uninstalling.html
- Install Xcode from the App Store
- Launch XCode, agree to the license terms, and enter your password in the auth dialog box.
- Go to Preferences/Downloads
- Select "Check for and install updates automatically" and then click "Check and Install Now"
- Open a Terminal window:
## Reset your path, in case you have a previous install that ## might bugger the configure. (Thanks Rainer) export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin ## Install Xcode CLI. Install dialog should open up and auth ## the install. (Thanks Drew, and others) xcode-select --install ## Fetch MacPorts source code curl -O https://distfiles.macports.org/MacPorts/MacPorts-2.2.0.tar.bz2 ## Uncompress source and change to the source directory tar jxvf MacPorts-2.2.0.tar.bz2 cd MacPorts-2.2.0 ## Configure the make file for MacPorts (Thanks Clemens) ./configure --enable-readline ## Compile MacPorts make ## Install MacPorts sudo make install ## Fix your path (Thanks Peter) echo 'export PATH=/opt/local/bin:/opt/local/sbin:$PATH' >> ~/.profile source ~/.profile ## Update your ports sudo port -dv selfupdate
- Re-install your ports.
- Post nice comments. 🙂
UPDATE: 2013-10-23 - I really appreciate the feedback I've been getting on this page. If the steps above don't work perfectly for you, please check the comments below.
UPDATE 2: 2013-10-23 - My apologies to everyone for the site slowness and instability earlier. This was a new VM and I hadn't optimized my Apache config. I was caught a little off-guard by the huge increase in traffic. 🙂
UPDATE 3: 2013-10-24 - Thanks to all of the wonderful contributors to this thread, there are new, improved and simplified instructions. The current instructions have been tested in a brand new Mavericks VM, but should also work with systems that have previous MacPorts installs. If you have any problems, please leave me feedback and I'll try to help.