R postgres连接到RS-DBI驱动程序中的远程调查错误

问题描述:

我不能为我的生活得到postgres连接远程postgres数据库。R postgres连接到RS-DBI驱动程序中的远程调查错误

"Error in postgresqlNewConnection(drv, ...) : 
    RS-DBI driver: (could not connect" 

我已经安装了RPostgreSQL,我在后台运行的Postgres,我的MacBook是最新10.12.5 MacOS的山脉。

,仍然无法连接

drv <- dbDriver("RPostgreSQL") 
> con <- dbConnect(drv, host=hostName, 
+     port=portName, 
+     dbname=databaseName, 
+     user=userName, 
+     password=passwordName) 
Error in postgresqlNewConnection(drv, ...) : 
    RS-DBI driver: (could not connect 

notably..i可以经由postico应用中的所有相同的凭据连接。

我有同样的问题。我结束了使用RPostgres包。

免责声明:我无法完全按照git_hub指令安装软件包;

这里是我做的在Windows上成功安装:

1)安装Rtools按照指示here

2)安装devtools

install.packages("devtools") 

3)安装RcppDBI作为指令:

devtools::install_github("RcppCore/Rcpp") 
devtools::install_github("rstats-db/DBI") 

4)通过点击克隆下载源文件github并下载;将其解压缩到一个文件夹;

5)从源文件夹安装RPostgres

install.packages("path_to_downloads/Downloads/RPostgres-master/", repos = NULL, type="source") 
+0

我似乎无法安装。感觉就像是对R.的早期版本我使用 平台x86_64的 - 苹果darwin13.4.0 拱x86_64的 OS darwin13.4.0 系统x86_64的,darwin13.4.0 未成年3.2 2016年 月建成10个 第31天 version.string R版本3.3.2(2016-10-31) 昵称Sincere Pumpkin Patch – ElChapo

+1

肯定不是100%。我有和你一样的系统配置。我发现的一个技巧是以普通的方式安装Rcpp'install.packages(“Rcpp”); devtools :: install_github( “rstats-DB/DBI”); devtools :: install_github( “rstats-DB/RPostgres”)' – Psidom