在CentOS中安装软件包时遇到麻烦:无法加载Internet例程

博谢克:

更新R后,在CentOS上的R中安装软件包时遇到一些麻烦。这是当我尝试在R中安装软件包时发生的示例:

> install.packages("ggplot2")
Installing package into '/home/albers/R/x86_64-pc-linux-gnu-library/3.2'
(as 'lib' is unspecified)
--- Please select a CRAN mirror for use in this session ---
Error in download.file(url, destfile = f, quiet = TRUE) :
  internet routines cannot be loaded
In addition: Warning message:
In download.file(url, destfile = f, quiet = TRUE) :
  unable to load shared object '/usr/local/lib64/R/modules//internet.so':
  /usr/local/lib64/R/modules//internet.so: undefined symbol: curl_multi_wait
HTTPS CRAN mirror

 1: 0-Cloud [https]                2: Austria [https]
 3: Chile [https]                  4: China (Beijing 4) [https]
 5: Colombia (Cali) [https]        6: France (Lyon 2) [https]
 7: France (Paris 2) [https]       8: Germany (M▒nster) [https]
 9: Iceland [https]               10: Mexico (Mexico City) [https]
11: Russia (Moscow) [https]       12: Spain (A Coru▒a) [https]
13: Switzerland [https]           14: UK (Bristol) [https]
15: UK (Cambridge) [https]        16: USA (CA 1) [https]
17: USA (KS) [https]              18: USA (MI 1) [https]
19: USA (TN) [https]              20: USA (TX) [https]
21: USA (WA) [https]              22: (HTTP mirrors)


Selection: 1
Warning: unable to access index for repository https://cran.rstudio.com/src/contrib:
  internet routines cannot be loaded
Warning message:
package 'ggplot2' is not available (for R version 3.2.5)

因此,我花了一些时间搜索错误消息。我更新了curl的最新版本:

$ curl -V
curl 7.48.0 (x86_64-pc-linux-gnu) libcurl/7.48.0 zlib/1.2.8
Protocols: dict file ftp gopher http imap pop3 rtsp smtp telnet tftp
Features: IPv6 Largefile libz UnixSockets

仍然无法安装软件包,并且收到相同的错误消息。所以,我想下面的说明这个帖子,特别是添加下面的命令我.bash_profile

export LD_LIBRARY_PATH=$TOOLS/curl-7.48.0/lib:$LD_LIBRARY_PATH

同样,我收到关于R无法加载共享对象的相同错误消息。最终,这也是一个下载问题,download.file同样也失败了。这是我的sessionInfo()

R version 3.2.5 (2016-04-14)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS release 6.2 (Final)

locale:
 [1] LC_CTYPE=en_US.iso885915       LC_NUMERIC=C
 [3] LC_TIME=en_US.iso885915        LC_COLLATE=en_US.iso885915
 [5] LC_MONETARY=en_US.iso885915    LC_MESSAGES=en_US.iso885915
 [7] LC_PAPER=en_US.iso885915       LC_NAME=C
 [9] LC_ADDRESS=C                   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

我能够与下载文件wgetcurl但只要我开始R,我无法下载任何东西。

有人对我如何解决此问题有任何建议吗?

哈里:

这样尝试。

install.packages("ggplot2", repos="http://cran.cnr.berkeley.edu")

或在安装它之前,将下载工具更改为其他工具,即在Linux上,您可以尝试按以下方式尝试wget。

options(download.file.method = "wget")

请注意,我已经放弃了httpshttp我有一个类似的错误...

Selection: 1
Warning: unable to access index for repository https://cran.rstudio.com/src/contrib:
  unsupported URL scheme
Warning message:
package ‘ggplot2’ is not available (for R version 3.2.3) 

如果您从问题中查看以下行的输出...

Yours
Protocols: dict file ftp gopher http imap pop3 rtsp smtp telnet tftp
Mine (Also Centos 6)
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp 

curl缺少https支持。curl_multi_wait您的输出中也存在错误这是在7.28.0中添加的。

https://curl.haxx.se/libcurl/c/curl_multi_wait.html

如果您需要在本地构建curl,请执行此操作

mkdir -p $HOME/curl
cd $HOME/curl
git clone https://github.com/curl/curl.git
cd curl
bash buildconf
./configure --prefix=$HOME/libcurl
make
make install

此时,您需要在.bash_profile中设置LD_LIBRARY_PATH,即

export LD_LIBRARY_PATH=$HOME/libcurl/lib:$LD_LIBRARY_PATH

然后注销并再次登录或

source ~/.bash_profile

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

R 更新后无法安装软件包:无法访问存储库的索引:无法加载 Internet 例程

在Julia中安装软件包时遇到错误

用Java导入软件包时遇到麻烦

安装软件包时无法加载软件包%s错误

无法在CentOS的R中安装XML软件包

错误:无法解析以下软件包名称:在Julia中安装软件包时出错

当apt-get遇到无法找到软件包的安装问题时,继续出错

无法在Pycharm中安装软件包

无法在R中安装软件包

无法在atom中安装软件包

通过DVD在CentOS中安装软件包,而无需连接到Internet

如何在centos 7中删除软件包时如何删除所有已安装的从属软件包?

在RStudio中从源代码安装R软件包时遇到问题-Ubuntu 16.04

在R中安装opVaR软件包时遇到困难

无法在CentOS上安装PHP软件包

R无法在centos 6.5上安装软件包

错误:无法立即加载已安装的软件包

继续安装:“无法加载软件包”(即使设置了GOPATH)

无法在CentOS 7的R Studio中安装RPostgreSQL软件包

在Powershell中安装Az模块时出错-无法安装软件包“ Az.Accounts”

Python中的持久性环境问题-安装的Python软件包无法加载

通用Lisp软件包-可能无法加载软件包时如何处理?

在新安装的spacemacs中安装软件包时出错

在caffe安装中安装python软件包时出错

尝试使用APT安装软件包时“无法找到软件包”

安装 cuda 时无法修复损坏的软件包

在Linux中创建系统文件时无法加载python软件包

无法安装新的软件/软件包

在Octave中安装软件包时“无法解析主机名”