Open xiw588 opened 2 years ago
Have you installed a postgresql-devel package with sudo yum install postgresql-devel or sudo yum install postgresql[appropriate version no]-devel ?
@tomoakin no..I was trying to install on cluster, not allowed to sudo
@benz0li I tried install.packages("RPostgreSQL", configure.args = c(PG_INCDIR = "/usr/pgsql-11/include")) but same error
The first thing you should do is to find pg_config and put it in your PATH. If there isn't on the system, I do not understand what is your idea to use PostgreSQL at all (where is the server running and are they accessible?) Regardless of sudo privilege, you can compile and install the whole PostgreSQL under your home directory if you have sufficient capacity. Then you can direct the PATH to include them. However, the PostgreSQL server normally requires to occupy certain resource (port etc.) for operation and belongs to the superuser control. You can use some non-default port, though.
The lesson of #116 is to ask the IT staff for necessary information. If your include files aren't in /usr/pgsql-11/include, install.packages("RPostgreSQL", configure.args = c(PG_INCDIR = "/usr/pgsql-11/include")) will not help.
I am trying to install the package in r but kept receiving the following error messages and was unable to install.
trying URL 'https://mirrors.nics.utk.edu/cran/src/contrib/RPostgreSQL_0.7-3.tar.gz' Content type 'application/x-gzip' length 580771 bytes (567 KB)
downloaded 567 KB
include
compilation terminated. ./pqconftest ./configure: line 2852: ./pqconftest: No such file or directory system -lpq don't appear to work; use internal checking for "/libpq-fe.h"... no configure: creating ./config.status config.status: creating src/Makevars ** libs gcc -I/n/helmod/apps/centos7/Core/curl/7.45.0-fasrc01/include -I/n/helmod/apps/centos7/Core/bzip2/1.0.6-fasrc01/include -I -I/n/helmod/apps/centos7/Core/pcre/8.37-fasrc02/include -I/n/helmod/apps/centos7/Core/readline/6.3-fasrc02/include -L/n/helmod/apps/centos7/Core/bzip2/1.0.6-fasrc01/lib -L/n/helmod/apps/centos7/Core/pcre/8.37-fasrc02/lib -L/n/helmod/apps/centos7/Core/curl/7.45.0-fasrc01/lib -L/n/helmod/apps/centos7/Core/readline/6.3-fasrc02/lib64 -std=gnu99 -I"/n/helmod/apps/centos7/Core/R_core/3.5.1-fasrc01/lib64/R/include" -DNDEBUG -I -I/usr/local/include -fpic -g -O2 -c RS-DBI.c -o RS-DBI.o gcc -I/n/helmod/apps/centos7/Core/curl/7.45.0-fasrc01/include -I/n/helmod/apps/centos7/Core/bzip2/1.0.6-fasrc01/include -I -I/n/helmod/apps/centos7/Core/pcre/8.37-fasrc02/include -I/n/helmod/apps/centos7/Core/readline/6.3-fasrc02/include -L/n/helmod/apps/centos7/Core/bzip2/1.0.6-fasrc01/lib -L/n/helmod/apps/centos7/Core/pcre/8.37-fasrc02/lib -L/n/helmod/apps/centos7/Core/curl/7.45.0-fasrc01/lib -L/n/helmod/apps/centos7/Core/readline/6.3-fasrc02/lib64 -std=gnu99 -I"/n/helmod/apps/centos7/Core/R_core/3.5.1-fasrc01/lib64/R/include" -DNDEBUG -I -I/usr/local/include -fpic -g -O2 -c RS-PQescape.c -o RS-PQescape.o In file included from RS-PQescape.c:7:0: RS-PostgreSQL.h:23:26: fatal error: libpq-fe.h: No such file or directory
include "libpq-fe.h"
compilation terminated. make: *** [RS-PQescape.o] Error 1 ERROR: compilation failed for package ‘RPostgreSQL’