【问题标题】:Centos 6.3 R installation errorCentos 6.3 R 安装错误
【发布时间】:2017-08-14 11:44:41
【问题描述】:

我是 centos 新手,所以我尝试安装 R。它已安装但在我编写控制台时出现此错误

R

dyn.load(file, DLLpath = DLLpath, ...) 中的错误:无法加载 共享对象'/usr/lib64/R/library/utils/libs/utils.so':
/usr/lib64/R/library/utils/libs/utils.so:未定义符号: libssh2_agent_disconnect 另外:警告消息:包 未找到选项(“defaultPackages”)中的“方法”错误:包 “grDevices”没有命名空间另外:警告消息: 1:未找到选项(“defaultPackages”)中的包'utils' 2: 未找到选项(“defaultPackages”)中的包“grDevices”错误 : 包‘grDevices’没有命名空间另外:警告 消息:选项(“defaultPackages”)中的包“图形”不是 在 dyn.load(file, DLLpath = DLLpath, ...) 中发现错误:无法 加载共享对象'/usr/lib64/R/library/methods/libs/methods.so':
/usr/lib64/R/library/methods/libs/methods.so:未定义符号: libssh2_agent_disconnect 另外:警告消息:包'stats' 在启动期间未找到选项(“defaultPackages”) - 警告 消息:未找到选项(“defaultPackages”)中的包“方法”

这个错误怎么办?我无法发挥任何作用。 例如;

install.packages("test")

错误:找不到函数“install.packages”

谢谢

【问题讨论】:

    标签: r linux centos rstudio centos6


    【解决方案1】:

    更新 libssh2 为我解决了这个问题

    在下面,我将分享我安装 R 的经验,因为我遇到了类似的问题,在通过简单地更新 libssh2 包进行了相当多的鬼混之后解决了!

    安装了 R 版本 3,一旦启动,它就会抛出关于无法加载共享对象的各种错误,每个错误都以魔术错误“未定义符号:libssh2_exit”结尾,我试图找出这些对象有什么问题,我试图使用 ldconfig 强制加载它们,但我所有的尝试都白费了!这些文件存在,而且它们看起来无论如何都没有损坏

    {
    [root@Centos6-vtl-sb ~]# R
    
    Error in dyn.load(file, DLLpath = DLLpath, ...) :
      unable to load shared object '/usr/lib64/R/library/methods/libs/methods.so':
      /usr/lib64/R/library/methods/libs/methods.so: undefined symbol: libssh2_exit
    
    R version 3.3.3 (2017-03-06) -- "Another Canoe"
    Copyright (C) 2017 The R Foundation for Statistical Computing
    Platform: x86_64-redhat-linux-gnu (64-bit)
    
    R is free software and comes with ABSOLUTELY NO WARRANTY.
    You are welcome to redistribute it under certain conditions.
    Type 'license()' or 'licence()' for distribution details.
    
      Natural language support but running in an English locale
    
    R is a collaborative project with many contributors.
    Type 'contributors()' for more information and
    'citation()' on how to cite R or R packages in publications.
    
    Type 'demo()' for some demos, 'help()' for on-line help, or
    'help.start()' for an HTML browser interface to help.
    Type 'q()' to quit R.
    
    Error in dyn.load(file, DLLpath = DLLpath, ...) :
      unable to load shared object '/usr/lib64/R/library/utils/libs/utils.so':
      /usr/lib64/R/library/utils/libs/utils.so: undefined symbol: libssh2_exit
    
    In addition: Warning message:
    package "methods" in options("defaultPackages") was not found
    
    Error in dyn.load(file, DLLpath = DLLpath, ...) :
      unable to load shared object '/usr/lib64/R/library/grDevices/libs/grDevices.so':
      /usr/lib64/R/library/grDevices/libs/grDevices.so: undefined symbol: libssh2_exit
    
    In addition: Warning message:
    package "utils" in options("defaultPackages") was not found
    
    Error in dyn.load(file, DLLpath = DLLpath, ...) :
      unable to load shared object '/usr/lib64/R/library/grDevices/libs/grDevices.so':
      /usr/lib64/R/library/grDevices/libs/grDevices.so: undefined symbol: libssh2_exit
    
    In addition: Warning message:
    package "grDevices" in options("defaultPackages") was not found
    
    Error in dyn.load(file, DLLpath = DLLpath, ...) :
      unable to load shared object '/usr/lib64/R/library/grDevices/libs/grDevices.so':
      /usr/lib64/R/library/grDevices/libs/grDevices.so: undefined symbol: libssh2_exit
    
    In addition: Warning message:
    package "graphics" in options("defaultPackages") was not found
    
    Error in dyn.load(file, DLLpath = DLLpath, ...) :
      unable to load shared object '/usr/lib64/R/library/methods/libs/methods.so':
      /usr/lib64/R/library/methods/libs/methods.so: undefined symbol: libssh2_exit
    
    In addition: Warning message:
    package "stats" in options("defaultPackages") was not found
    
    During startup - Warning message:
    package "methods" in options("defaultPackages") was not found
    
    > quit()
    
    Save workspace image? [y/n/c]: n
    
    [root@Centos6-vtl-sb ~]# ls /usr/lib64/R/library/methods/libs/methods.so
    /usr/lib64/R/library/methods/libs/methods.so
    [root@Centos6-vtl-sb ~]#
    
    }
    

    最后我决定检查libssh2版本,发现我的版本是现代版本,一旦我更新它,那些错误就消失了

    {
    
    [root@Centos6-vtl-sb ~]# yum whatprovides libssh2
    
    Loaded plugins: fastestmirror, refresh-packagekit
    
    Loading mirror speeds from cached hostfile
     * base: mirror.steadfast.net
     * centosplus: mirror.steadfast.net
     * elrepo: mirrors.ircam.fr
     * epel: ftp.upjs.sk
     * extras: mirror.steadfast.net
     * updates: mirror.steadfast.net
    
    libssh2-1.4.2-2.el6_7.1.x86_64 : A library implementing the SSH2 protocol
    Repo        : base
    Matched from:
    
    libssh2-1.4.2-2.el6_7.1.i686 : A library implementing the SSH2 protocol
    Repo        : base
    Matched from:
    
    libssh2-1.2.2-7.el6.x86_64 : A library implementing the SSH2 protocol
    Repo        : installed
    Matched from:
    Other       : Provides-match: libssh2
    
    [root@Centos6-vtl-sb ~]# rpm -qa | grep -i libssh
    libssh2-1.2.2-7.el6.x86_64
    [root@Centos6-vtl-sb ~]#
    
    [root@Centos6-vtl-sb ~]#
    [root@Centos6-vtl-sb ~]# yum update libssh2
    .......
    
    [root@Centos6-vtl-sb ~]# R
    
    R version 3.3.3 (2017-03-06) -- "Another Canoe"
    Copyright (C) 2017 The R Foundation for Statistical Computing
    Platform: x86_64-redhat-linux-gnu (64-bit)
    
    R is free software and comes with ABSOLUTELY NO WARRANTY.
    You are welcome to redistribute it under certain conditions.
    Type 'license()' or 'licence()' for distribution details.
    
      Natural language support but running in an English locale
    
    R is a collaborative project with many contributors.
    Type 'contributors()' for more information and
    'citation()' on how to cite R or R packages in publications.
    
    Type 'demo()' for some demos, 'help()' for on-line help, or
    'help.start()' for an HTML browser interface to help.
    Type 'q()' to quit R.
    
    >
    > quit()
    Save workspace image? [y/n/c]: y
    [root@Centos6-vtl-sb ~]#
    }
    

    谢里夫

    【讨论】:

    • 嗨谢里夫。如果“这不是真正的答案”,我不会发布答案。如果您认为它可以解决问题,请随时发布。
    • 更新libssh2 也为我解决了这个问题。我建议您将其放在答案的顶部。
    猜你喜欢
    • 2013-06-05
    • 2012-08-09
    • 2012-08-09
    • 2013-08-07
    • 1970-01-01
    • 2014-12-04
    • 2013-04-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多