Please I need help, I´m tryn to install the packages Rpostgres in my R sesion but i can´t.
My log:
> devtools::install_github("r-dbi/RPostgres")
Downloading GitHub repo r-dbi/RPostgres@HEAD
✓ checking for file ‘/tmp/Rtmp1j8ZnS/remotes3cca7bcfd6b8/r-dbi-RPostgres-a45662a/DESCRIPTION’ (569ms)
─ preparing ‘RPostgres’:
✓ checking DESCRIPTION meta-information
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘RPostgres_1.4.3.9000.tar.gz’
Installing package into ‘/home/jsanfranciscog/R/x86_64-koji-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
* installing *source* package ‘RPostgres’ ...
Using PKG_CFLAGS=
Using PKG_LIBS=-lpq
Using PKG_PLOGR=
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libpq was not found. Try installing:
* deb: libpq-dev libssl-dev (Debian, Ubuntu, etc)
* rpm: postgresql-devel (Fedora, EPEL)
* rpm: postgreql8-devel, psstgresql92-devel, postgresql93-devel, or postgresql94-devel (Amazon Linux)
* csw: postgresql_dev (Solaris)
* brew: libpq (OSX)
If libpq is already installed, check that either:
(i) 'pkg-config' is in your PATH AND PKG_CONFIG_PATH contains
a libpq.pc file; or
(ii) 'pg_config' is in your PATH.
If neither can detect , you can set INCLUDE_DIR
and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------[ ERROR MESSAGE ]----------------------------
<stdin>:1:10: fatal error: libpq-fe.h: No such file or directory
compilation terminated.
-----------------------------------------------------------------------
ERROR: configuration failed for package ‘RPostgres’
* removing ‘/home/jsanfranciscog/R/x86_64-koji-linux-gnu-library/3.4/RPostgres’
Warning message:
In i.p(...) :
installation of package ‘/tmp/Rtmp1j8ZnS/file3cca354df6a8/RPostgres_1.4.3.9000.tar.gz’ had non-zero exit status
thanks