I'm trying to install OpenSSL in R via
install.packages("openssl")
It's a clean install of R via brew so not sure what's wrong. Here are the last ~20 logs
> o compatibility.o diffie.o envelope.o error.o hash.o info.o keygen.o
> keys.o onload.o openssh.o password.o pem.o pkcs12.o pkcs7.o rand.o
> rsa.o signing.o ssl.o stream.o write.o
> -L/usr/local/opt/openssl@1.1/lib -L/usr/local/opt/openssl/lib -lssl -lcrypto -F/usr/local/Cellar/r/3.3.2/R.framework/.. -framework R -lintl -Wl,-framework -Wl,CoreFoundation installing to /usr/local/lib/R/3.3/site-library/openssl/libs
> ** R
> ** inst
> ** preparing package for lazy loading
> ** help
> *** installing help indices
> ** building package indices
> ** installing vignettes
> ** testing if installed package can be loaded Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object
> '/usr/local/lib/R/3.3/site-library/openssl/libs/openssl.so':
> dlopen(/usr/local/lib/R/3.3/site-library/openssl/libs/openssl.so, 6):
> Symbol not found: _DSA_get0_key Referenced from:
> /usr/local/lib/R/3.3/site-library/openssl/libs/openssl.so Expected
> in: flat namespace in
> /usr/local/lib/R/3.3/site-library/openssl/libs/openssl.so Error:
> loading failed Execution halted ERROR: loading failed
> * removing ‘/usr/local/lib/R/3.3/site-library/openssl’
>
> The downloaded source packages are in
> ‘/private/var/folders/8n/47bzk9810mq31790qbb38zg80000gn/T/Rtmpe7etrQ/downloaded_packages’
> Warning message: In install.packages("openssl") : installation of
> package ‘openssl’ had non-zero exit status
Just lucky I guess but randomly solved it. I uninstalled openssl from brew, which may require you to do this:
brew uninstall --ignore-dependencies openssl
If you run it without the --ignore-dependencies
, then it will list the packages that depend on it, if any. Then go back to R and install openssl
and it works (at least for me). You can then install openssl
from brew for brew packages if they stop working. I had no trouble using R with it (so far)
brew install openssl
I got the same error to you and after trying to uninstall and reinstall, etc. without error, I finally succeeded with changing the lib to my local lib install of using default:
/Users/username/Library/R/3.6/library
By default, R install packages into /usr/local/lib/R/3.6/site-library
. Let's try with
install.packages("openssl", lib = "/Users/username/Library/R/3.6/library")
You can run .libPaths()
for checking your library paths
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.