OpenSSL安装和“openssl.so加载失败......执行暂停”

时间:2017-01-27 00:09:14

标签: r macos openssl

我正在尝试通过

在R中安装OpenSSL
install.packages("openssl")

这是通过brew彻底安装R,所以不确定是什么问题。这是最后的~20日志

> 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

2 个答案:

答案 0 :(得分:0)

我很幸运,但随机解决了它。我从brew中卸载了openssl,这可能需要你这样做:

brew uninstall --ignore-dependencies openssl

如果在没有--ignore-dependencies的情况下运行它,那么它将列出依赖它的软件包(如果有的话)。然后返回R并安装openssl并且它有效(至少对我而言)。如果它们停止工作,您可以从brew安装openssl brew包。我使用R(到目前为止)没有问题

brew install openssl

答案 1 :(得分:0)

我遇到了同样的错误,并且尝试卸载并重新安装等之后,没有错误,我终于成功地将lib更改为使用default的本地lib安装:

/Users/username/Library/R/3.6/library

默认情况下,R将软件包安装到/usr/local/lib/R/3.6/site-library中。让我们尝试

install.packages("openssl", lib = "/Users/username/Library/R/3.6/library")

您可以运行.libPaths()来检查库路径