Closed Hamedhm closed 2 years ago
Hi, can someone please contribute to this?
@Hamedhm Maybe https://stackoverflow.com/questions/56230187/no-such-file-error-libpq-fe-h-when-installing-postgresql-package-for-r-on-linux?
The install script is looking for PostgreSQLheader files in the following directories:
[...]
configure: Checking include /usr/include.
configure: Checking include /usr/include/postgresql.
configure: Checking include /usr/local/include.
configure: Checking include /usr/local/include/postgresql.
configure: Checking include /usr/local/pgsql/include.
configure: Checking include /usr/local/postgresql/include.
[...]
IMHO /usr/pgsql-11/include/
does not look like a standard location.
Thanks @benz0li
Is there any way that I pass the path as a parameter to the installation process?
Try
install.packages("RPostgreSQL", configure.args = c(PG_INCDIR = "/usr/pgsql-11/include")
You may also set PG_LIBDIR
.
Do you have the program named pg_config in a place specified in the PATH environmental variable? In normal installation in various unix systems, postgresql installation should have pg_config and pg_config tells includes and library files.
If the IT person says the includes are in /usr/pgsql-11/include/libpq-fe.h some likely place is /usr/pgsql-11/bin If not, you can ask where pg_config, psql etc. are placed.
Oh thank you very much.
I added /usr/pgsql-11/bin to .bash_profile and it works now. Thanks for the lovely help
Thanks for the great work.
I am trying to install RPostgreSQL on a local Linux environment. When I hit the install.packages('RPostgreSQL') I get:
The error is related to libpq-fe.h that I talked to out IT team and they said it is in
-rw-r--r-- 1 root root 22K Feb 11 2021 /usr/pgsql-11/include/libpq-fe.h
Is there any way that we get around this issue?