2
Since MacPorts is not compatible with /usr/local *, whenever I install/update ports with MacPorts I would
sudo mv /usr/local /usr/local.bak
and after I am done building MacPorts stuff
sudo mv /usr/local.bak /usr/local
This works and solves a lot of the previous mysterious build errors. However it is very cumbersome and sometimes I don't remember to do this, either the "before" step or the "after" step, and have to fix it afterward.
Is there a better way to avoid this conflict?
EDIT
* see these links for examples/suggestions of temporarily moving /usr/local
as a solution to MacPort build problems.
https://stackoverflow.com/questions/1827377/install-git-core-svn-fails-with-macport
I am using MacPorts; and I don't have Homebrew. Please see the edit for why I am doing this.
I am curious why you don't have this issue though. I have checked my path and it points to
/opt/local/bin:/opt/local/sbin:/opt/subversion/bin:
before anything from/usr/local
. But this is still an issue. – ceiling cat – 2011-08-31T08:12:33.9371MacPorts cannot isolate itself away from
/usr/local
, as this path is in the default search path of the compiler and cannot be removed. – raimue – 2011-09-23T15:16:42.353