On R, I was trying to install the PostgreSQL package called the RPostgreSQL
.
I tried to install it by issuing the statement in the command-line like so:
R
The command-line statement displayed the output:
R version 3.5.2 (2018-12-20) -- "Eggshell Igloo"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-redhat-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
>
then I tried to install the package
install.packages("RPostgreSQL")
then it failed to install with this error message
In file included from RS-PQescape.c:7:0:
RS-PostgreSQL.h:23:14: fatal error: libpq-fe.h: No such file or directory
# include "libpq-fe.h"
^~~~~~~~~~~~
compilation terminated.
It seems that R can't find the file/library called libpq-fe.h
. What could be the solution to this?