py25-psycopg2 <-> postgresql81 not talking

Ryan Schmidt ryandesign at macports.org
Wed Dec 19 23:08:01 PST 2007


Yes, you could do that. Uninstall instructions for MacPorts are here:

http://trac.macosforge.org/projects/macports/wiki/ 
FAQ#HowdoIremoveoruninstallMacPorts

Before following those instructions, you may want to "sudo port -f  
uninstall installed"
	
On Dec 20, 2007, at 00:55, Micheal Cooper wrote:

> Since I don't have anything of worth in the db yet, can I just  
> uninstall everything via Ports, remove /usr/local, and then  
> reinstall from zero?
>
> On Dec 20, 2007 3:50 PM, Ryan Schmidt wrote:
>
>> On Dec 19, 2007, at 19:36, Micheal Cooper wrote:
>>
>> > I went through several attempts to install a django dev
>> > environment, and in the process I installed different versions of
>> > python from dmg and macports, uninstalled, etc. In the end, I
>> > uninstalled everything and then did:
>> > `sudo port install py25-psycopg2`
>> > which also installed postgresql81 and python25, then I did
>> > 'sudo port install postgresql81-server subversion'
>> > after which I should be ready to go, but I am not.
>> >
>> > When I run 'python manage.py runserver' in my django project
>> > directory, I get:
>> > raise ImproperlyConfigured("Error loading psycopg2 module: %s" % e)
>> > django.core.exceptions.ImproperlyConfigured : Error loading  
>> psycopg2
>> > module: dlopen(/Library/Frameworks/Python.framework/Versions/2.5/
>> > lib/python2.5/site-packages/psycopg2/_psycopg.so, 2): Library not
>> > loaded: /usr/local/pgsql/lib/libpq.4.dylib
>> >   Referenced from: /Library/Frameworks/Python.framework/Versions/
>> > 2.5/lib/python2.5/site-packages/psycopg2/_psycopg.so
>>
>> Danger, Will Robinson: /usr/local? The python25 port has
>> inadvertently been linked against the PostgreSQL library found in
>> your /usr/local directory. This is why we recommend not having
>> anything in /usr/local. Stuff there frequently conflicts with
>> MacPorts ports. Please move /usr/local elsewhere, for example /usr/
>> local-off, then rebuild any ports (such as python25) that have
>> inadvertently linked against things in /usr/local. Once you're sure
>> everything works, and once you've replaced anything in /usr/local-off
>> with ports, remove /usr/local-off.
>>
>>
>> > Using `sudo locate libpq.4.dylib` gives me:
>> > /opt/local/lib/postgresql81/libpq.4.dylib
>> > /opt/local/var/macports/software/postgresql81/8.1.10_0+darwin_8/ 
>> opt/
>> > local/lib/postgresql81/libpq.4.dylib
>> >
>> > I would rather have the system set up to rely on MacPorts so that I
>> > can update/ upgrade with ease. I did install psycopg2 from a dmg
>> > before starting over and installing through MacPorts, so I can only
>> > assume that the system is looking for the old psycopg2 and not
>> > finding the one installed by MacPorts.
>> >
>> > I have not created anything yet, and this is only a dev environment
>> > I am trying to set up, so I would be happy to delete a lot of stuff
>> > and start from scratch again, but since I uninstalled everything
>> > and then reinstalled with MacPorts twice, I seem to be missing
>> > someone.
>> >
>> > Please advice, and thank you.


More information about the macports-users mailing list