Installing without root privileges: what about /Applications/MacPorts?

Ryan Schmidt ryandesign at
Sat Sep 13 17:27:06 PDT 2008

On Sep 12, 2008, at 9:13 AM, Michael Williams wrote:

> I think I've successfully installed MacPorts without root privileges.
> I installed from source using:
> ./configure --prefix=$HOME/.macports --with-install-user=$USER --with-
> install-group=staff --with-tclpackage=~/Library/Tcl

I also prefer to use MacPorts without root when possible... I use this:

./configure \
--enable-readline \
--prefix=$PREFIX \
--with-tclpackage=$PREFIX/Library/Tcl \
--with-install-user=rschmidt \

> (this was based on my interpretation of 
> wiki/gsoc08-privileges)

As Bryan said, the gsoc08-privileges branch has not yet been merged  
into trunk, so if you're building from trunk, you're not getting any  
of that new code yet.

> However, I've run into trouble with a couple of packages. These errors
> boil down to:
> Error: Target org.macports.activate returned: can't create  
> directory "/
> Applications/MacPorts": permission denied

I change the ownership of /Applications/MacPorts to my user.

> Is there any way to change this directory to, say, ~/Applications/
> MacPorts or is it hard-coded?

In MacPorts 1.6.0 and earlier it is hardcoded. In trunk, there is a  
new configure parameter --with-applications-dir and a new  
macports.conf option applications_dir. Many ports do not yet respect  
this parameter. If file tickets for any such port you find so we can  
correct the problem.

Actually I set applications_dir to /Applications/mp, just to make it  
different from the default so I can more easily spot ports that don't  
use the setting. That's also one of the reasons I don't use /opt/ 
local as my MacPorts prefix.

> p.s. if anyone knows mutt and MacPorts well, I have another package
> problem which I think it mutt-related rather than MacPorts, but
> comments welcome: 
> users/browse_thread/thread/49b65590cb94eea5#

More information about the macports-users mailing list