If you have another TeX distribution installed via Fink or MacPorts, it can interfere with the operation of a MacTeX distribution when you are compiling from the command line. This is due to the fact that MacPorts and Fink ususally set the
$PATH environment varible in a way so that their installation is seen first. (Such problems don't usually arise when compiling within an editing environment such as TeXShop, since the editor sets the path internally.)
Since the MacPorts/Fink TeX distributions are not as up-to-date as MacTeX, this can result in packages not being found, as in your case.
MacPorts creates a
.profile file in your home directory to set the path. It may look something like:
This tells the system to prepend the MacPorts path (
/opt/) to the existing path. (Fink does something similar, but the relevant directory is
/sw/.) Since it is prepended, anything in MacPorts/Fink will be found before anything else. For many things, this is what you want, since you may have installed MacPorts/Fink to gain access to more up-to-date versions of Unix software compared to that installed by OS X itself. However, in the case of MacTeX, you want the MacTeX distribution (
/usr/texbin) to be found before anything in MacPorts.
To do this, you need to change the command above to the following:
This will have the desired effect. You will need to logout of your current terminal session to have the change take effect (or type