0

我尝试使用 conda 安装 R,如下所示: (base) [root@localhost ~]# conda install -crr 安装完成后,我尝试运行 R,不幸的是,我遇到以下错误: $ R /opt/miniconda3 /lib/R/bin/exec/R:加载共享库时出错:libreadline.so.6:无法打开共享对象文件:没有这样的文件或目录

It should be mentioned there is libreadline.so.7.0 in the following paths:
    /lib64/libreadline.so.7.0
    /usr/lib64/libreadline.so.7.0

My OS is as below:
    (base) [root@localhost ~]# cat /etc/os-release
    NAME="CentOS Linux"
    VERSION="8"
    ID="centos"
    ID_LIKE="rhel fedora"
    VERSION_ID="8"
    PLATFORM_ID="platform:el8"
    PRETTY_NAME="CentOS Linux 8"
    ANSI_COLOR="0;31"
    CPE_NAME="cpe:/o:centos:centos:8"
    HOME_URL="https://centos.org/"
    BUG_REPORT_URL="https://bugs.centos.org/"
    CENTOS_MANTISBT_PROJECT="CentOS-8"
    CENTOS_MANTISBT_PROJECT_VERSION="8"

Also, output of ($conda list) related to r is as below:
    r                         3.2.2                         0
    r-base                    3.2.2                         0
    r-boot                    1.3_17                r3.2.2_0a    r
    r-class                   7.3_14                r3.2.2_0a    r
    r-cluster                 2.0.3                 r3.2.2_0a    r
    r-codetools               0.2_14                r3.2.2_0a    r
    r-foreign                 0.8_66                r3.2.2_0a    r
    r-kernsmooth              2.23_15               r3.2.2_0a    r
    r-lattice                 0.20_33               r3.2.2_0a    r
    r-mass                    7.3_45                r3.2.2_0a    r
    r-matrix                  1.2_2                 r3.2.2_0a    r
    r-mgcv                    1.8_9                 r3.2.2_0a    r
    r-nlme                    3.1_122               r3.2.2_0a    r
    r-nnet                    7.3_11                r3.2.2_0a    r
    r-recommended             3.2.2                  r3.2.2_0    r
    r-rpart                   4.1_10                r3.2.2_0a    r
    r-spatial                 7.3_11                r3.2.2_0a    r
    r-survival                2.38_3                r3.2.2_0a    r
    readline                  8.1                  h27cfd23_0

Any help will be appreciated.
4

1 回答 1

0

我看到了以下链接: https ://askubuntu.com/questions/1168787/libreadline-so-6-issue-in-ubuntu-18-04 并基于此链接中的答案之一,我尝试了以下命令:

# cd /usr/lib64
# ln -s libreadline.so.7 libreadline.so.6

虽然它解决了我的问题,但我想知道是否有更好的解决方案?令我惊讶的是为什么 conda 没有安装 libreadline.so.6?

于 2021-12-23T16:13:09.630 回答