Getting MacPorts to work Snow Leopard

Impatient? Skip to the process and go right to the solution.

I’m writing this using my shiny new OS X 10.6 Snow Leopard installation. So far it’s pretty good. I haven’t tried any heavy lifting so I don’t know if it’s really that much faster.

This is the first in a series of posts on how to get things working in Snow Leopard that got eaten during the installation. First up: MacPorts.

I ran into some issues with MySQL, (more on that later), and since my MySQL install is a MacPort I thought I would do an update to make sure things were working properly. However, this is what happened when I typed sudo port list installed:

dlopen(/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib, 10): no suitable image found. Did find:
/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib: no matching architecture in universal wrapper
while executing
"load /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib"
("package ifneeded Pextlib 1.0" script)
invoked from within
"package require Pextlib 1.0"
(file "/opt/local/bin/port" line 40)

So, I tried sudo port selfupdate and ran into the same problem. Whatever port command I tried I got the same response, clearly I needed to take some sort of action. After a quick look at the MacPorts website I figured I should update my Xcode Tools to the Snow Leopard version, so I did that, (there’s an installer in the Optional Installs folder on the Snow Leopard disk) and tried sudo port list installed again, and got the same response as before.

Some quick Googling & reading resulted in no quick answer, so I figured that since I don’t really have anything irreplaceable in my MySQL databases I would download the Snow Leopard DMG from the MacPorts download page, install, and see what happened. That’s the solution! Just download the Snow Leopard DMG and re-install. All of your ports will still be there, and mine seem to be working so far.

The Melee about “Getting MacPorts to work Snow Leopard

  1. Not all packages work well though. Lots of them got “wrong architecture” warning which leads to failed build. python26 will be the case if you try to upgrade it.

    Your blog is so neat. Love it!

  2. Yeah, I can imagine that a lot of the packages will need updating as well. I ran a port selfupdate and a port upgrade outdated with no problem, but I don’t have very many packages, (MySQL is the only one I use often), and python is not one of the packages I have.

  3. I think we wait a few days until the people who maintain the packages update them. Once they’re updated for Snow Leopard they should build fine.

  4. I’d suggest recompiling everything. Even if it doesn’t error out, it’ll probably be faster. Luckily, it’s dirt simple in Macports 1.8:

    sudo port upgrade –force installed

  5. The –force option seems to be working wonders for me, thanks Steve. Everything seems to be building, (I did a sudo port upgrade --force outdated). We’ll see how they run after.

  6. Thanks Max, I’ll look into it. I haven’t really had to do much with MacPorts in a while so I haven’t really looked into this much more.

What do you think?

Your name and E-mail address, and of course a comment, are required. I won't do anything evil with your E-mail address.

If you so desire, you may use these tags in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>