0

The package "mongolite" won't install itself when trying in RStudio. So I downloaded it from https://cran.r-project.org/web/packages/mongolite/, extracted it in the folder which manages the R packages /usr/local/lib/R/site-library then launched sudo ./configure but I got this error

Found pkg-config cflags and libs!
Using PKG_CFLAGS=
Using PKG_LIBS=-lsasl2 -lssl -lcrypto -lresolv
./configure: line 71: /bin/R: No such file or directory
./configure: line 72: /bin/R: No such file or directory
./configure: line 73: /bin/R: No such file or directory
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because openssl/sasl was not found. Try installing:
 * deb: libssl-dev, libsasl2-dev (Debian, Ubuntu, etc)
 * rpm: openssl-devel, cyrus-sasl-devel (Fedora, CentOS, RHEL)
 * csw: libssl_dev, sasl_dev (Solaris)
 * brew: openssl (Mac OSX)
If openssl is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a openssl.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------

libssl-dev and libsasl2-dev are installed and pkg-config is in my PATH so I can't find any way to solve the problem. I also tried to launch ./configure PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig/" because this is where the file openssl.pc is located but still the same error.

0

I finally re-ran install.packages("mongolite") in RStudio and it miraculously worked fine.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.