mongolite
mongolite copied to clipboard
R rtools failed to install(build) old archived mongolite_1.6.tar.gz
I want to install mongodb in R. Since our production system is using old mongodb, the new R mongolite version couldn't get connect. So I decide to install the old version from archive.
However, my win10 using R 4.2.1 faced 1 critical errors
I already downloaded archived package mongolite_1.6.tar.gz from (https://cran.r-project.org/src/contrib/Archive/mongolite/)
I run the command: (the first argument need to be replaced by your downloaded location of file)
install.packages("~/mongolite_1.6.tar.gz", repos = NULL)
Then I got error message:
gcc -shared -s -static-libgcc -o mongolite.dll tmp.def bson.o client.o collection.o cursor.o gridfs.o hex.o mongo_log.o reader.o utils.o -L. -L../windows/openssl-1.1.0f/lib/x64 -Lmongoc -lstatmongoc -Lbson -lstatbson -lssl -lcrypto -lcrypto -lgdi32 -lcrypt32 -lws2_32 -lsecur32 -ldnsapi -lz -Lc:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64 -Lc:/rtools42/x86_64-w64-mingw32.static.posix/lib -LD:/R/R-42~1.1/bin/x64 -lR
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ../windows/openssl-1.1.0f/lib/x64/libcrypto.a(pem_lib.o):pem_lib.c:(.text+0xfd): undefined reference to `__imp___iob_func'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ../windows/openssl-1.1.0f/lib/x64/libcrypto.a(eng_openssl.o):eng_openssl.c:(.text+0xb): undefined reference to `__imp___iob_func'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ../windows/openssl-1.1.0f/lib/x64/libcrypto.a(eng_openssl.o):eng_openssl.c:(.text+0x18f): undefined reference to `__imp___iob_func'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ../windows/openssl-1.1.0f/lib/x64/libcrypto.a(ui_openssl.o):ui_openssl.c:(.text+0x19): undefined reference to `__imp___iob_func'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ../windows/openssl-1.1.0f/lib/x64/libcrypto.a(ui_openssl.o):ui_openssl.c:(.text+0x782): undefined reference to `__imp___iob_func'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: ../windows/openssl-1.1.0f/lib/x64/libcrypto.a(ui_openssl.o):ui_openssl.c:(.text+0x7a2): more undefined references to `__imp___iob_func' follow
collect2.exe: error: ld returned 1 exit status
no DLL was created
My sessionInfo()
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8 LC_CTYPE=Chinese (Simplified)_China.utf8 LC_MONETARY=Chinese (Simplified)_China.utf8
[4] LC_NUMERIC=C LC_TIME=Chinese (Simplified)_China.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Rcpp_1.0.9 jsonlite_1.8.0