Can you install Macports to the home directory and still have everything work?

2

I do not have root access on my computer, and I would like to install Macports. That raises a problem, however, because installing Macports requires sudo. This link shows how you can install Macports to the home directory, but will everything work properly?

e.g. all packages work right, no conflict between files, etc.

Thanks in advance!

XQLRSZ

Posted 2014-09-20T20:47:30.210

Reputation: 21

So did it work? – miken32 – 2014-10-08T16:25:44.147

@miken32 Sorry for not looking at this again. I haven't been on SE for several months. It did work, but Macports would always throw errors, something about no Xcode found, but I had the command line tools so everything still worked. Also, because I had Homebrew installed in my home directory, it complained about finding a Macports install, but nothing ever failed to build. – XQLRSZ – 2015-01-15T21:11:35.990

Answers

0

Yes! Installing MacPorts like that without root privileges still works perfectly after more than 10 years.

Just to echo the article here: compile from source (instructions) to build it for your username in a directory you choose e.g. ~/macports/:

./configure --prefix=${HOME}/macports --with-install-user=${USER} --with-install-group=staff

Then use port the way you normally would, but without sudo.

PS: I guess MacPorts will regain some popularity since HomeBrew dropped formula options in 2.0.

Duvrai

Posted 2014-09-20T20:47:30.210

Reputation: 334