Fluxy
Fluxy

Reputation: 2978

How to install older version of mongolite using URL with tar.gz?

I use R version 3.6.2 and I installed mongolite as follows:

install.packages("mongolite")

Then I tried to connect to my MongoDB server as follows (from R):

con <- mongo(url="xxx", collection = "tescollection", db="testdb", verbose = TRUE)

However, it fails with the following error message:

Server at xxx:11155 reports wire version 2, but this version of libmongoc requires at least 3 (MongoDB 3.0)

How can I fix this issue without changing the server's MongoDB version?

I found the solution for php, but I am using R.

I tried to install an earlier version of mongolite as follows, but then it says package ‘mongolite’ is not available (for R version 3.6.2):

install.packages("mongolite", repo="https://cran.r-project.org/src/contrib/Archive/mongolite/mongolite_1.6.tar.gz", lib="library")

Upvotes: 0

Views: 361

Answers (1)

niko
niko

Reputation: 5281

Using devtools should do the trick

devtools::install_version("mongolite", version = "1.6")

Upvotes: 2

Related Questions