[R] Install RPostgreSQL (Mac OSX 10.6)
XDriftwood
stefan.froehlich at swissglobal-am.com
Tue Nov 24 22:19:21 CET 2009
Dear all, I'm an absolute R-beginner and want to connect to my PostgreSQL DB
(on my local Mac OSX 10.6).
1) I tried to install RPostgreSQL (Package Installer > CRAN (sources)) and
get this log below. There seems to be an issue with libpq, bug I don't have
any clue how to fix this. What can I do?
2) Once this issue is solved, should this code work?
drv <- dbDriver("PostgreSQL")
con <- dbConnect(drv,user="postgresql",password=password,dbname="DB")
dbSendQuery(con,"create table testTab as select * from Tab")
dbDisconnect(con)
dbUnloadDriver(drv)
Thanks, Tom
trying URL
'http://cran.ch.r-project.org/src/contrib/RPostgreSQL_0.1-6.tar.gz'
Content type 'application/x-gzip' length 141399 bytes (138 Kb)
opened URL
==================================================
downloaded 138 Kb
* installing *source* package ‘RPostgreSQL’ ...
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for pg_config... no
configure: checking for PostgreSQL header files
checking for "/libpq-fe.h"... no
configure: error: File libpq-fe.h not in ; installation may be broken.
ERROR: configuration failed for package ‘RPostgreSQL’
* removing
‘/Library/Frameworks/R.framework/Versions/2.10/Resources/library/RPostgreSQL’
The downloaded packages are in
‘/private/var/folders/sA/sArT9JYcG9qiUI-T+f3TZE+++TI/-Tmp-/RtmpEeMtM8/downloaded_packages’
--
View this message in context: http://old.nabble.com/Install-RPostgreSQL-%28Mac-OSX-10.6%29-tp26503444p26503444.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list