Install macports in local home directory

December 12, 2008

I was needing to install MacPorts on a multi-user system where I didn’t have root access. Here is what I did.

mkdir ${HOME}/macports
cd ${HOME}/macports
tar -xzvf MacPorts-1.6.0.tar.gz
cd MacPorts-1.6.0
./configure --prefix=${HOME}/macports --with-tclpackage=${HOME}/macports/tcl \
--with-install-user=${USER} --with-install-group=${USER}
make install

You will now have a macports directory in your home directory:

$ ls macports
bin     etc     include lib     libexec man     sbin    share   src     tcl     var     www

Add ${HOME}/macports/bin to your path and you’ll be able to run “port install portname” ports you install will get installed in your home directory. Handy for any little tools you need to have available that might not be built on the system you’re using.

comments powered by Disqus
Install MacPorts in Local Home Directory - December 12, 2008 - Jonah Duckles