MacPorts without root privileges: how?

Gf B gbspambucket at
Wed Feb 9 12:34:44 PST 2011

I installed MacPorts from source, with the --with-no-root-privileges flag,
and configured it so that it uses ~/.macports/opt/local as its $prefix.

I want to run MacPorts on my laptop *always* without root privileges,
because I don't want it to modify anything whatsoever outside of the $prefix
mentioned above.

Still, despite the configuration described above, some installations are
failing due to insufficient permissions.

For example, the installation of Emacs fails because the installation of
dbus fails, and the latter fails because of this:

--->  Installing dbus @1.2.24_1
Warning: addgroup only works when running as root.
Warning: The requested group 'messagebus' was not created.
Warning: adduser only works when running as root.
Warning: The requested user 'messagebus' was not created.
--->  Activating dbus @1.2.24_1
Error: Target org.macports.activate returned: error copying
.24_1/Library/LaunchDaemons/org.freedesktop.dbus-system.plist" to
 permission denied
Error: Failed to install dbus

I'm fine with setting up the messagebus user and groups "by hand" using
sudo, but I do not want MacPorts to put anything under /Library.  What must
I do to get MacPorts to use a different location for these files?

In case I must finish this installation "manually", what must I do so that
the installation of ports that depend on dbus do not croak on account of not
having this dependency?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-users mailing list