繁体   English   中英

安装 R 包时出错。 找不到 -lgmop -lquadmath

[英]Error install R package. Cannot find -lgmop -lquadmath

我对 R 相当陌生,所以如果这是一个直截了当的问题,请原谅我。

我正在使用一个集群 (CentOS7),我在其中使用 miniconda 安装了 R (v. 4.0.3),以及我需要的一堆其他工具。 之后我使用“内置”R 方式安装软件包,即使用install.packages("package_name") 对于某些软件包,例如ggplot2这没有问题。 但是,当我尝试安装其他软件包时,例如vegan ,它失败并显示以下错误消息

/home/bq_uell/miniconda3/envs/antigen.garnish/bin/../lib/gcc/x86_64-conda-linux-gnu/7.5.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lgomp
/home/bq_uell/miniconda3/envs/antigen.garnish/bin/../lib/gcc/x86_64-conda-linux-gnu/7.5.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lquadmath
collect2: error: ld returned 1 exit status

安装binutils没有帮助。 如果有人能指出我做错了什么,或者我错过了什么,我会很高兴!

干杯!

编辑:这是整个错误消息:

* installing *source* package ‘vegan’ ...
** package ‘vegan’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-conda-linux-gnu-cc -I"/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib/R/include" -DNDEBUG   -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -I/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -Wl,-rpath-link,/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib   -fpic  -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base_1603051729662/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish=/usr/local/src/conda-prefix  -c data2hill.c -o data2hill.o
x86_64-conda-linux-gnu-gfortran -fno-optimize-sibling-calls  -fpic  -fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base_1603051729662/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish=/usr/local/src/conda-prefix  -c decorana.f -o decorana.o
x86_64-conda-linux-gnu-cc -I"/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib/R/include" -DNDEBUG   -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -I/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -Wl,-rpath-link,/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib   -fpic  -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base_1603051729662/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish=/usr/local/src/conda-prefix  -c getF.c -o getF.o
x86_64-conda-linux-gnu-cc -I"/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib/R/include" -DNDEBUG   -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -I/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -Wl,-rpath-link,/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib   -fpic  -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base_1603051729662/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish=/usr/local/src/conda-prefix  -c goffactor.c -o goffactor.o
x86_64-conda-linux-gnu-cc -I"/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib/R/include" -DNDEBUG   -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -I/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -Wl,-rpath-link,/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib   -fpic  -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base_1603051729662/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish=/usr/local/src/conda-prefix  -c init.c -o init.o
x86_64-conda-linux-gnu-gfortran -fno-optimize-sibling-calls  -fpic  -fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base_1603051729662/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish=/usr/local/src/conda-prefix  -c monoMDS.f -o monoMDS.o
x86_64-conda-linux-gnu-cc -I"/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib/R/include" -DNDEBUG   -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -I/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -Wl,-rpath-link,/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib   -fpic  -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base_1603051729662/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish=/usr/local/src/conda-prefix  -c nestedness.c -o nestedness.o
x86_64-conda-linux-gnu-gfortran -fno-optimize-sibling-calls  -fpic  -fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base_1603051729662/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish=/usr/local/src/conda-prefix  -c ordering.f -o ordering.o
x86_64-conda-linux-gnu-cc -I"/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib/R/include" -DNDEBUG   -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -I/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -Wl,-rpath-link,/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib   -fpic  -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base_1603051729662/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish=/usr/local/src/conda-prefix  -c pnpoly.c -o pnpoly.o
x86_64-conda-linux-gnu-cc -I"/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib/R/include" -DNDEBUG   -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -I/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -Wl,-rpath-link,/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib   -fpic  -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base_1603051729662/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish=/usr/local/src/conda-prefix  -c stepacross.c -o stepacross.o
x86_64-conda-linux-gnu-cc -I"/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib/R/include" -DNDEBUG   -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -I/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -Wl,-rpath-link,/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib   -fpic  -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base_1603051729662/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish=/usr/local/src/conda-prefix  -c vegdist.c -o vegdist.o
x86_64-conda-linux-gnu-cc -shared -L/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib/R/lib -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib -Wl,-rpath-link,/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib -L/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib -Wl,-rpath-link,/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib -o vegan.so data2hill.o decorana.o getF.o goffactor.o init.o monoMDS.o nestedness.o ordering.o pnpoly.o stepacross.o vegdist.o -llapack -lblas -lgfortran -lm -lgomp -lquadmath -lpthread -lgfortran -lm -lgomp -lquadmath -lpthread -L/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib/R/lib -lR
/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/bin/../lib/gcc/x86_64-conda-linux-gnu/7.5.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lgomp
/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/bin/../lib/gcc/x86_64-conda-linux-gnu/7.5.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lquadmath
collect2: error: ld returned 1 exit status
make: *** [/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib/R/share/make/shlib.mk:10: vegan.so] Error 1
ERROR: compilation failed for package ‘vegan’
* removing ‘/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib/R/library/vegan’

The downloaded source packages are in
        ‘/tmp/RtmpeFtKBY/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In doTryCatch(return(expr), name, parentenv, handler) :
  unable to load shared object '/home/bq_nhirschmuell/miniconda3/envs/antigen.garnish/lib/R/modules//R_X11.so':
  libXt.so.6: cannot open shared object file: No such file or directory
2: In install.packages("vegan") :
  installation of package ‘vegan’ had non-zero exit status

有两种可能:

  • 第一个是库的名称。 搜索安装的库的确切名称是什么。 当您使用-lgomp ,链接器将搜索libgomp.so (或 libgomp.a,如果您是静态链接)。 如果你只找到libgomp.so.something有两种可能:
    *使用ln -s libgomp.so.something libgomp.so创建符号链接
    * 或链接-l:libgomp.so.something

  • 第二种可能是路径。 -v添加到您的链接命令并验证 libgomp.so 的路径是否存在于 collect2 使用的搜索路径列表中。 如果它不存在是因为安装文件夹不是链接默认研究文件夹的一部分,请使用-L选项添加它。

您需要对其他库执行相同操作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM