I think I've solved it! Realised you need to install libpq-fe.h before you can install psycopg.
Which under Debian is simply installed with: apt-get install libpq-dev Thanks mark ---- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > I'm just trying to install Psycopg2 on the client (webserver) which is > connected via ethernet to the Database server. But to do so I thought I had > to update the pg_config and library_dirs in the psychpg2 file: setup.cfg, > otherwise I get the following if I do nothing to it: > > running buildcd install/psycopg2-2.0.5.1 > running build_pyall/psycopg2-2.0.5.1# ls > running build_ext INSTALL MANIFEST psycopg setup.cfg ZPsycopgDA > Warning: /bin/sh: line 1: pg_config: command not foundtup.py > building 'psycopg2._psycopg' extension scripts tests > gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -fPIC -DPY_MAJOR_VERSION=2 -DPY_MINOR_VERSION=5 -DHAVE_PYBOOL=1 > -DHAVE_DECIMAL=1 -DHAVE_PYDATETIME=1 -DPSYCOPG_DEFAULT_PYDATETIME=1 > -DPSYCOPG_VERSION="2.0.5.1 (dec dt ext pq3)" -DPSYCOPG_EXTENSIONS=1 > -DPSYCOPG_DISPLAY_SIZE=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 > -DHAVE_PQPROTOCOL3=1 -I/usr/local/include/python2.5 -I. -c > psycopg/psycopgmodule.c -o build/temp.linux-i686-2.5/psycopg/psycopgmodule.o > In file included from psycopg/psycopgmodule.c:28: > ./psycopg/connection.h:26:22: error: libpq-fe.h: No such file or directory > In file included from psycopg/psycopgmodule.c:28: > ./psycopg/connection.h:55: error: expected specifier-qualifier-list before > 'PGconn' > In file included from psycopg/psycopgmodule.c:29: > ./psycopg/cursor.h:55: error: expected specifier-qualifier-list before > 'PGresult' > psycopg/psycopgmodule.c: In function '_psyco_connect_fill_exc': > psycopg/psycopgmodule.c:103: error: 'connectionObject' has no member named > 'exc_Error' > psycopg/psycopgmodule.c:105: error: 'connectionObject' has no member named > 'exc_Warning' > psycopg/psycopgmodule.c:107: error: 'connectionObject' has no member named > 'exc_InterfaceError' > psycopg/psycopgmodule.c:109: error: 'connectionObject' has no member named > 'exc_DatabaseError' > psycopg/psycopgmodule.c:111: error: 'connectionObject' has no member named > 'exc_InternalError' > psycopg/psycopgmodule.c:113: error: 'connectionObject' has no member named > 'exc_ProgrammingError' > psycopg/psycopgmodule.c:115: error: 'connectionObject' has no member named > 'exc_IntegrityError' > psycopg/psycopgmodule.c:117: error: 'connectionObject' has no member named > 'exc_DataError' > psycopg/psycopgmodule.c:119: error: 'connectionObject' has no member named > 'exc_NotSupportedError' > psycopg/psycopgmodule.c:121: error: 'connectionObject' has no member named > 'exc_OperationalError' > error: command 'gcc' failed with exit status 1 > > I'm asking what do I place into the pg_config and library_dirs in order for > the installation to work on the client web server? Or what do I in general to > make it work? > > I mentioned in my previous email, that > pg_config=/usr/local/pgsql/bin/pg_config and > library_dirs=/usr/local/pgsql/lib on the database, but how do I reference > this in the installation of Psychpg on the client webserver? > > ---- Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > > On Wed, 2007-04-18 at 13:49 +1000, Mark Jarecki wrote: > > > To further illustrate my question. > > > > > > When installing Psychopg2, if the Database server was on the same > > > machine as the Web server, I would normally update the setup.cfg > > > prior to running "python setup.py build", with the following: > > > > > > pg_config=/usr/local/pgsql/bin/pg_config > > > library_dirs=/usr/local/pgsql/lib > > > > > > However, as I want to separate the Web server and the Database > > > server, and the above file and directory are on another machine (say > > > 192.168.344.222), what should I enter in these fields? > > > > I don't really understand what you're trying to do with setup.cfg (what > > package is this setup file for?), but to answer your original question, > > the psycopg module lives on the database client side -- so on the web > > server in this case. It is loaded and used by the webserver code to act > > as a client to talk to a remote database server. Basically psycopg2 is > > the python equivalent of the psql program. > > > > Regards, > > Malcolm > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---