Installing RPostgreSQL

1,061 views
Skip to first unread message

David Hastie

unread,
Nov 21, 2012, 5:43:23 AM11/21/12
to shiny-...@googlegroups.com
Hi 

Just signed up to the Shiny Server beta. I tried to install the package RPostgreSQL to connect to my postgresql database, but unfortunately if fails the basic sanity test (which I think checks to see if PostgreSQL is installed on the Ubuntu host. This is the error message in RStudio Server

In file included from RS-PQescape.c:7:0:
RS-PostgreSQL.h:23:26: fatal error: libpq-fe.h: No such file or directory
compilation terminated.
make: *** [RS-PQescape.o] Error 1
ERROR: compilation failed for package ‘RPostgreSQL’
* removing ‘/home/onsideanalysis/R/library/RPostgreSQL’
Warning in install.packages :
  installation of package ‘RPostgreSQL’ had non-zero exit status

I tried then doing a local install of postgresql which seems to work well, and then building RPostgreSQL against this local install. I seemed to get further (everything seemed to compile) but when the package tested if it could be loaded it failed again

installing to /home/onsideanalysis/R/library/RPostgreSQL/libs
** R
** inst
** preparing package for lazy loading
Creating a generic function for ‘format’ from package ‘base’ in package ‘RPostgreSQL’
Creating a generic function for ‘print’ from package ‘base’ in package ‘RPostgreSQL’
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/home/onsideanalysis/R/library/RPostgreSQL/libs/RPostgreSQL.so':
  libpq.so.5: cannot open shared object file: No such file or directory
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/onsideanalysis/R/library/RPostgreSQL’
Warning in install.packages :
  installation of package ‘RPostgreSQL’ had non-zero exit status

Is there any chance postgresql could be installed on the host machine to avoid having to compile against local. I'm pretty sure that would fix it.

Many thanks
Dave

This e-mail and any files transmitted with it are confidential and may be legally privileged. If you receive it in error or are not the intended recipient you must not copy, distribute or take any action in reliance upon it. Instead, please notify us immediately by telephoning +44 (0) 1483 277275 and delete the material from your systems. Onside Analysis is a business carried on by Onside Analysis Limited, a company registered with the Registrar of Companies for England and Wales with number 7707216. Registered office: 28 Southway, Carshalton, Surrey, SM5 4HW, UK.

Joe Cheng [RStudio]

unread,
Nov 23, 2012, 5:23:21 PM11/23/12
to shiny-...@googlegroups.com
Hi David, I'm happy to install postgresql-client on glimmer but unfortunately not postgresql itself. We can't offer hosting of actual PostgreSQL databases at this time, as we don't currently have the ability to track user quotas across databases.

Let me know if you want postgresql-client; if not, stay tuned for the release of our beta Shiny Server standalone server.


--
 
 

Hastie, David

unread,
Nov 23, 2012, 5:26:41 PM11/23/12
to shiny-...@googlegroups.com
Hi Joe

Yes, completely understand. Definitely don't want postgresql installed, as I am using my own databases hosted elsewhere. Really just want to be able to get RPostgreSQL package to compile, so minimum possible to achieve that would be great.

Many thanks
Dave


--
 
 



--
-------------------------------------------------
David Hastie, Ph.D. 
Executive Director
Onside Analysis Ltd


Joe Cheng

unread,
Nov 23, 2012, 6:12:08 PM11/23/12
to shiny-...@googlegroups.com
OK, I installed the client libraries so you should be able to install/compile RPostgreSQL now without your local PostgreSQL install.


--
 
 

Hastie, David

unread,
Nov 23, 2012, 6:20:19 PM11/23/12
to shiny-...@googlegroups.com
Hi Joe

That's great, installed and working. Many thanks for your help.

Cheers
Dave
Reply all
Reply to author
Forward
0 new messages