Getting MacPorts to work
2014-04
I have OSX 10.6.8. I have X11 and have installed Xcode Developer Tools 3.26 and MacPorts. I wish to install FontForge so that I can merge in some glyphs that are missing from my favourite font.
I can find lots of terse instructions on what to type at my xterm command line to do all manner of maintenance tasks, but it is not clear what I have to type to install FontForge, or whether I have to download anything from FontForge first and if so where I should place it.
I have typed "sudo port install fontforge" on the command line incase MacPorts knows how to find and get it, but I just get "Port fontforge not found".
For good measure I typed "sudo port selfupdate" and got "Error: Error synchronizing MacPorts sources: command execution failed".
I typed "port list" and got "Warning: Can't open index file for source: rsync://rsync.macports.org/release/tarballs/ports.tar Error: listing all ports failed: No index(es) found! Have you synced your port definitions? Try running 'port selfupdate'. bash-3.2$ port selfupdate"
What do I actually have to do to make this work? Thanks for your great assistance. Connor
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.
http://stackoverflow.com/questions/1827377/install-git-core-svn-fails-with-macport
I don't understand what /usr/local
conflicts you're talking about. MacPorts intentionally uses its own /opt
hierarchy in order to avoid conflicting with anything you already had in /usr/local
. It shouldn't be putting anything in /usr/local
unless perhaps you changed its configuration.
Were you thinking of Homebrew? I believe Homebrew still puts things in /usr/local
by default, whereas MacPorts uses /opt
and Fink uses /sw
.
So I guess my "better way to avoid this conflict" is to use MacPorts instead of Homebrew, and leave MacPorts set to its default prefix of /opt
.