Hi all, I tried to install the Rdbi_0.1-2.tar.gz and Rdbi.PgSQL_0.1-2 package. The Rdbi_0.1-2.tar.gz installed fine but the Rdbi.PgSQL_0.1-2 had some problems. The compilation routine tried to find a header called libpq-fe.h but did not find it in the standard locations. I searched through the computer but did not find a file called in this way either. What should I do to successuffly install this package? In the Netleters introduction to R/GRASS interface there is no mention about this problems. The PostgreSQL_7.2.1 Users guide states: "Frontend programs that use libpq must include the header file libpq-fe.h and must link with the libpq library." Is Libpq a package that can be downloaded and how should I create this header and make a link to it? I use R 1.6.2.1 and PostgreSQL 7.2 with RedHat 7.3. [root at localhost pack]# R CMD INSTALL Rdbi.PgSQL_0.1-2.tar.gz * Installing *source* package 'Rdbi.PgSQL' ... creating cache ./config.cache checking for PQconnectdb in -lpq... yes checking how to run the C preprocessor... cc -E checking for /usr/include/libpq-fe.h... no checking how to run the C preprocessor... cc -E checking for /usr/include/pgsql/libpq-fe.h... no checking how to run the C preprocessor... cc -E checking for /usr/include/postgresql/libpq-fe.h... no checking how to run the C preprocessor... cc -E checking for /usr/local/include/libpq-fe.h... no checking how to run the C preprocessor... cc -E checking for /usr/local/include/pgsql/libpq-fe.h... no checking how to run the C preprocessor... cc -E checking for /usr/local/include/postgresql/libpq-fe.h... no checking how to run the C preprocessor... cc -E checking for /opt/include/libpq-fe.h... no checking how to run the C preprocessor... cc -E checking for /opt/include/pgsql/libpq-fe.h... no checking how to run the C preprocessor... cc -E checking for /opt/include/postgresql/libpq-fe.h... no I could not find your PostgreSQL client headers! Use --with-pgsql-includes=PATH; if running R's INSTALL, use --configure-args='--with-pgsql-includes=PATH'; or set PG_INCLUDE_DIR in your environment to the library path, and rerun the configure/install. ERROR: configuration failed for package 'Rdbi.PgSQL' Thanks for suggestions, Miha Staut
1) What has this to do with GRASS? It has very little to do with R, either, appearing to be a PostgreSQL installation problem. 2) Did you install PostgreSQL from source, or install RPMS: if the latter did you install _all_ the RPMs? I suspect you don't have the client files installed. On my system (installed from the sources under RH7.3) libpq-fe.h is in /usr/local/pgsql/include. 3) Rdbi/Rdbi.PgSQL are not on CRAN and appear not to be supported, but in any case you would do best to ask the author(s)/maintainer(s) about packages, and especially non-CRAN packages. 4) There is no such thing as R 1.6.2.1, and reports have it that Rdbi.PgSQL does not work with the current versions of R. The only currently supported R interface to PostgreSQL would appear to be RODBC. On Sun, 11 May 2003, Miha STAUT wrote:> I tried to install the Rdbi_0.1-2.tar.gz and Rdbi.PgSQL_0.1-2 package. The > Rdbi_0.1-2.tar.gz installed fine but the Rdbi.PgSQL_0.1-2 had some problems. > The compilation routine tried to find a header called libpq-fe.h but did > not find it in the standard locations. I searched through the computer but > did not find a file called in this way either. What should I do to > successuffly install this package? In the Netleters introduction to R/GRASS > interface there is no mention about this problems. > > The PostgreSQL_7.2.1 Users guide states: "Frontend programs that use libpq > must include the header file libpq-fe.h and must link with the libpq > library." Is Libpq a package that can be downloaded and how should I create > this header and make a link to it?[...] -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Miha STAUT wrote:> The PostgreSQL_7.2.1 Users guide states: "Frontend programs that use libpq > must include the header file libpq-fe.h and must link with the libpq > library." Is Libpq a package that can be downloaded and how should I create > this header and make a link to it? > > I use R 1.6.2.1 and PostgreSQL 7.2 with RedHat 7.3.You need the appropriate -devel package. E.g for RedHat 6.2, libpq-fe.h is in the "postgresql-devel" RPM. -- Glynn Clements <glynn.clements at virgin.net>