[Linux-disciples] path conflict
Adam Rosi-Kessel
adam at rosi-kessel.org
Sun Nov 20 06:58:35 EST 2011
On 11/20/2011 12:30 AM, Chung-chieh Shan wrote:
> On 2011-11-20T00:14:01-0500, Jamie Forrest wrote:
>> I have a strange, circular path conflict going on (OS X). Lion comes
>> preinstalled with a version of postgresql in /usr/bin but I need to be
>> using the one that I installed in /usr/local/bin. However, the
>> /usr/local/bin directory also contains a default version of Python
>> (again, not the version I want to be using). So, if I add
>> /usr/local/bin to the head of my PATH variable in order to get psql
>> working properly, that also causes the wrong Python to be run.
>>
>> How do I get around this? Postgres and Python both come with lots of
>> executables so I'd rather not have to delete or mv all these out of
>> the directories. Any ideas?
> You can make a new directory, use symbolic links to make the Postgres
> files you want appear in this new directory, and add the new directory
> to your PATH instead of adding /usr/local/bin.
Is there no concept of "alternatives" in OS X? In Debian, where there
could be multiple versions of a package (e.g. a scripting language or a
database server), you run update-alternatives to select the one you want
to be the default. It is also accomplished by symlinks but saves the
manual effort.
Adam
More information about the Linux-disciples
mailing list