0

i am facing the following challenge, when i am trying to connect to the Rpostgresql using the DBI package i am getting the following error. Below is the code used for my connections

install.packages("DBI",INSTALL_opts="--no-multiarch")


suppressPackageStartupMessages(library('RPostgreSQL'))
suppressPackageStartupMessages(library('dplyr'))
suppressPackageStartupMessages(library("nortest"))
suppressPackageStartupMessages(library("DBI"))




con <- DBI::dbConnect(RPostgres::Postgres(),
                             dbname = "dbname",
                             host = "host",
                             port = "port",
                             password = "password",
                             user = "user",
                             base::list(sslmode="require", connect_timeout="10"),
                             service = NULL)

following the error i am getting which i am not able to resolve inspite of referring multiple posts on SO

Error in inDL(x, as.logical(local), as.logical(now), ...) : 
  unable to load shared object 'C:/Users/xxxx/Documents/R/win-library/4.0/Rcpp/libs/x64/Rcpp.dll':
  LoadLibrary failure:  The specified procedure could not be found.
  • What does `packageVersion("Rcpp")` return? (If an error, then make sure you have [Rtools](https://cloud.r-project.org/bin/windows/Rtools/) installed, then run `install.packages("Rcpp")`, then try this again.) – r2evans Dec 03 '20 at 01:16
  • i checked version of Rcpp: its giving 1.0.5 – Aftab Udaipurwala Dec 03 '20 at 10:47

1 Answers1

0

After a lot of searching on the internet, I finally uninstalled and reinstalled the R. My earlier version was 3.6.3 and now it's 4.0.3 Now all the packages are working fine, no error at all... I guess it was an issue with the R version