You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

CentOS7环境下安装R语言redux包加载失败求助

在CentOS7 Docker环境中安装R语言redux包失败求助

在CentOS7的Docker环境中尝试安装R语言的redux包时遇到错误,其他R包可正常安装并引用,特此求助。

我的Dockerfile内容如下:

FROM centos:centos7

RUN yum -y install wget git tar

RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

RUN yum -y install epel-release openssh-server

ENV R_VERSION=4.0.5

RUN wget https://cdn.rstudio.com/r/centos-7/pkgs/R-${R_VERSION}-1-1.x86_64.rpm \
  && yum -y install R-${R_VERSION}-1-1.x86_64.rpm \
  && rm R-${R_VERSION}-1-1.x86_64.rpm

ENV PATH="${PATH}:/opt/R/${R_VERSION}/bin/"

RUN yum -y install openssl-devel

RUN Rscript -e "install.packages(c('redux'), repos = 'https://packagemanager.rstudio.com/all/__linux__/centos7/latest')"

RUN Rscript -e "library(redux)"

CMD ["/bin/bash"]

执行的镜像构建命令:

docker build -t test-3:latest .

得到的报错信息:

=> ERROR [8/8] RUN Rscript -e "library(redux)"                                                                                                                                                                    0.6s
------                                                                                                                                                                                                                   
 > [8/8] RUN Rscript -e "library(redux)":                                                                                                                                                                                
#12 0.528 Error: package or namespace load failed for 'redux' in dyn.load(file, DLLpath = DLLpath, ...):                                                                                                                 
#12 0.528  unable to load shared object '/opt/R/4.0.5/lib/R/library/redux/libs/redux.so':                                                                                                                                
#12 0.528   libhiredis.so.0.12: cannot open shared object file: No such file or directory                                                                                                                                
#12 0.528 Execution halted
------
executor failed running [/bin/sh -c Rscript -e "library(redux)"]: exit code: 1

内容的提问来源于stack exchange,提问作者emerald

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.17 20:30:48