Installing MacPorts on Snow Leopard

2

I installed MacPorts from the DMG package at http://www.macports.org/install.php

After installing it I tried to use it and get this:

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

I tried removing /opt/local/share/macports and /opt/local/bin/port and reinstalling, but it did not help.

Update:

I tried a complete removal by doing

%% sudo rm -rf \
    /opt/local \
    /Applications/DarwinPorts \
    /Applications/MacPorts \
    /Library/LaunchDaemons/org.macports.* \
    /Library/Receipts/DarwinPorts*.pkg \
    /Library/Receipts/MacPorts*.pkg \
    /Library/StartupItems/DarwinPortsStartup \
    /Library/Tcl/darwinports1.0 \
    /Library/Tcl/macports1.0 \
    ~/.macports

And then installing MacPorts-1.9.2-10.6-SnowLeopard.dmg but still I get same error.

Bemmu

Posted 2011-04-27T07:09:10.600

Reputation: 808

1

If you don't specifically need MacPorts you can try Homebrew which is a more up-to-date replacement with easier installation and usage. Just run ruby -e "$(curl -fsSL https://gist.github.com/raw/323731/install_homebrew.rb)"

– slhck – 2011-04-27T07:43:33.790

Thanks slhck, I went with MacPorts because it was one of the steps in http://stackoverflow.com/questions/4868185/how-to-install-pil-on-mac-osx-10-5-8-for-google-app-engine

– Bemmu – 2011-04-27T07:44:40.650

1@user16145 Ok! Btw you can put your working solution as an answer to this question and accept it in two days. – slhck – 2011-04-27T07:47:07.483

1We'd appreciate if you added an answer to the question as @slhck suggests, otherwise; it'll get automatically bumped to the front page, as the system thinks it's unanswered. – Daniel Beck – 2011-04-27T08:14:37.643

Answers

1

Install it from source.

tar xjvf MacPorts-1.9.2.tar.bz2
cd MacPorts-1.9.2
./configure && make && sudo make install
sudo port -v selfupdate

Bemmu

Posted 2011-04-27T07:09:10.600

Reputation: 808