Installing RPostgreSQL on Linux

Marta picture Marta · Mar 5, 2014 · Viewed 8.9k times · Source

When I try on linux in R

install.packages('RPostgreSQL')

it fails with unspecified errors:

  Warning message:
  In install.packages("RPostgreSQL") :
     installation of package ‘RPostgreSQL’ had non-zero exit status

I tried to solve problem with:

 sudo apt-get install postgresql-server-dev-8.4 for postgresql version 8.4.

but it doesn't seems to work.

    sudo: apt-get: command not found

I have PostgreSQL 9.1.11 version.

Answer

Dirk Eddelbuettel picture Dirk Eddelbuettel · Mar 5, 2014

Read the configure log.

You most likely "merely" forgot to read the README and DESCRIPTION and other documentation telling you to do

sudo apt-get install libpq-dev

We develop this on, inter alia, Debian/Ubuntu systems so can be more than sure that it works there.