Change prefix path

Arno Hautala arno at
Sat Apr 30 09:58:28 PDT 2011

On Sat, Apr 30, 2011 at 11:58, Ryan Schmidt <ryandesign at> wrote:
> As Daniel said, yes, you can change the prefix -- but not by editing macports.conf. (Thus I'm not sure why the prefix is even listed in macports.conf.) To change the prefix, you must build MacPorts from source and pass your desired prefix to the ./configure script.
> e.g.
> ./configure --prefix=/opt/mymacports --enable-readline
> make
> sudo make install

Note, that if you're doing this to have multiple installations of
MacPorts, you'll probably want to pass other "prefix" changes as well.
I used something along the lines of:

And you'll still have to contend with things like launchd plists that
want to install under /Library

Or, you may be content with just using "--prefix".

MacPorts should be the only thing writing to /opt/local anyway, why
exactly do you want to install to a different prefix? I ask because
there may be a better solution to your problem.

arno  s  hautala    /-|   arno at

pgp b2c9d448

More information about the macports-users mailing list