MacPorts Snow Leopard Upgrade

with 18 comments

After upgrading to Snow Leopard using sudo port caused errors:

no suitable image found
no matching architecture in universal wrapper

I was able to fix the problem by installing the Snow Leopard compatible version of MacPorts found on the download page.

Once you’ve installed the new MacPorts  you’ll want to make sure the ports tree and base sources are the latest available:

sudo port selfupdate

Then I ran a command to recompile:

sudo port upgrade --force 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"
(procedure "mportinit" line 382)
invoked from within
"mportinit ui_options global_options global_variations"
Error: /opt/local/bin/port: Failed to initialize MacPorts, 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


Written by syntatic

August 30, 2009 at 10:30 pm

Posted in Uncategorized

18 Responses

Subscribe to comments with RSS.

  1. Thank you! You, life saver 🙂


    August 31, 2009 at 1:30 pm

  2. Yes, thank you very much.

    Also – I had to reinstall the developer tools from the Snow Leopard disk before macports would work.

    I kept getting the error:
    “… returned: can’t read “build.cmd”: Failed to locate ‘make’ in path: …”

    Once I reinstalled OS X Developer tools (Make sure you check the UNIX Developer tools checkbox), I was able to use macports again, and then I ran the above command and all worked as it should.

    Thanks a bunch!


    September 4, 2009 at 3:29 pm

  3. I get the following error when I follow your instructions:

    —> Computing dependencies for perl5.8
    —> Building perl5.8
    Error: Target returned: shell command ” cd “/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_perl5.8/work/perl-5.8.9″ && /usr/bin/make -j16 all ” returned error 2
    Command output: /usr/bin/gcc-4.2 -L/opt/local/lib -L/usr/local/lib -force_flat_namespace -o miniperl \
    `echo gv.o toke.o perly.o op.o pad.o regcomp.o dump.o util.o mg.o reentr.o hv.o av.o perl.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o | sed ‘s/ op.o / /’` \
    miniperlmain.o opmini.o -ldl -lm -lutil -lc
    ld: in /usr/local/lib/libstdc++.6.dylib, file is not of required architecture
    collect2: ld returned 1 exit status
    make: *** [miniperl] Error 1

    Error: Unable to upgrade port: 1


    September 14, 2009 at 12:42 pm

  4. You need to install Apple’s Xcode Developer Tools and X11 per the instructions on the MacPorts download page.


    September 14, 2009 at 1:01 pm

  5. Thanks!


    September 17, 2009 at 5:42 am

  6. Thanks, this was great!!

    Shayan Es

    October 5, 2009 at 8:07 am

  7. wooohoo, you safed my day!


    October 15, 2009 at 3:19 am

  8. You saved my day as well. This was very useful. Thank you.

    At first I was reluctant to force an upgrade of all my installed ports but then I learned that MacPorts does not support migrating ports from one major OS version to another, so a rebuild is recommended anyway.


    October 17, 2009 at 7:43 pm

  9. I got errors when doing the sudo port upgrade –force installed

    so instead I followed these instructions:

    Basically uninstall all ports, then reinstall the ones I need one at a time.

    Simon Dorfman

    October 19, 2009 at 2:53 pm

  10. Thanks for the tip


    October 22, 2009 at 3:41 am

  11. I know about those migraton instructions in the macports wiki. However, I have dozens of ports, and for me, it would take me a huge amount of time to figure out which ports to actually use and which order to specify them, as described in step 3 of that article.

    Does anyone know of an _automated_ way to auto-upgrade all of the existing ports when moving from the Leopard version of macports to the Snow Leopard version?

    I can’t believe that the only way to do this is to _manually_ figure out the list of appropriate ports and to _manually_ order them based on their dependencies.

    Thanks in advance.


    November 25, 2009 at 6:38 pm

  12. @HippoMan

    I think might solve your problems.

    Gerad Suyderhoud

    December 4, 2009 at 10:32 am

  13. […] Turns out this guy went through the same thing as I did—and so, I’m sure did thousands of others—and came up with a good order of […]

  14. thanks a million times


    January 4, 2010 at 10:05 pm

  15. […] This time, my MacPorts migration was the smoothest yet, too. After googling, I first found this blog post about the author’s upgrade, but after reading the blog’s comments found a more reliable […]

  16. Yep, I did, Thanks.

    Daeyong Jung

    January 24, 2011 at 5:10 am

  17. Thanks mate! Worked a charm.


    February 14, 2011 at 11:27 am

  18. Thanks! Great post.


    February 15, 2011 at 10:50 am

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: