RStudio-Server错误:/bin/sh:x86_64-conda_cos6-linux-gnu-cc:找不到命令

5

当安装R包时,使用“/bin/sh:x86_64-conda_cos6-linux-gnu-cc:命令未找到”时,rstudio-server会失败。

我几乎尝试了所有处理此故障的方法。我成功地安装了依赖工具(使用conda),例如:

conda install gcc_linux-64 
conda install gxx_linux-64
conda install gfortran_linux-64

或者我已经将 conda 路径添加到 $PATH 中:

which conda
#/usr/softwares/conda/location/bin/conda

$PATH
#-bash: /usr/softwares/sratoolkit/sratoolkit.2.9.6-ubuntu64/bin:/usr/softwares/conda/location/envs/bioinf/bin:/usr/softwares/conda/location/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/huangwb8/.aspera/connect/bin:/usr/lib/rstudio-server/bin: No such file or directory

没有什么能够帮助解决问题。因为我可以在终端的 R 或者纯净的 R 环境下正常安装 R 包,但是当我使用 rstudio-server 时却经常失败。我认为这可能是我的 rstudio-server 出了问题,但是我不知道如何处理。 寻求帮助!!

2个回答

2

如果您的计算机上安装了其他更新版本,例如

x86_64-conda_cos7-linux-gnu-cc

在我的情况下,我在配置文件中更改了CC=x86_64-conda_cos6-linux-gnu-cc

1
在使用conda R安装Rstudio服务器中的软件包时,我也遇到了这样的情况。当我在shell R或纯R环境中正常安装R软件包时,我注意到了编译命令。
x86_64-conda_cos6-linux-gnu-cc -I"/app/sys/miniconda3/envs/R-3.6.1/lib/R/include" -DNDEBUG   -DNDEBUG -D_FORTIFY_SOURCE=2 -O2  -I/app/sys/miniconda3/envs/R-3.6.1/include -Wl,-rpath-link,/app/sys/miniconda3/envs/R-3.6.1/lib -Iutf8lite/src -fpic  -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -I/app/sys/miniconda3/envs/R-3.6.1/include -fdebug-prefix-map=/tmp/build/80754af9/r-base_1570124924484/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/app/sys/miniconda3/envs/R-3.6.1=/usr/local/src/conda-prefix  -c utf8lite/src/escape.c -o utf8lite/src/escape.o

在我看来,编译过程只是使用conda环境内的编译器。对于Rstudio-server内的安装,编译过程无法找到其指定的编译器(只存在系统默认编译器)。因此,我的建议是:

  • 在conda环境内的shell R中安装R包。(已尝试并成功)
  • 查找“x86_64-conda_cos6-linux-gnu-cc”的路径,并将其添加到默认路径中,例如~/.bashrc或~/.bash_profile,这样您的安装程序就可以找到编译器。(我还没有尝试过,也许可以解决问题)

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接