suma: error while loading shared libraries: libGLw.so.1: cannot open shared object file: No such

在CentOS Linux环境下,安装ANFI包时遇到 suma 命令找不到的问题,通过更新环境变量解决了该问题。然而,安装R包时出现了多个依赖包缺失的错误,尝试手动安装nloptr包仍然失败,原因是R包版本不一致。最后,通过指定nloptr包的版本成功安装。
摘要由CSDN通过智能技术生成

在 FSL虚拟机 CentOS linux系统中安装ANFI包,期望Resample DTI和fMRI数据。
首先,按照官方按照教程step-by-step安装软件,直到suma -update_env一步一切都正常。但suma回车之后报错

(base) [fsluser@fsl ~]$ suma -update_env
bash: suma: command not found...
Similar command is: 'sum'

这里报错的原因是漏掉了教程中,更新环境变量一步。这里稍稍吐槽一下自己的粗心,直接忽略掉教程中的Purpose内容:

Purpose: Download and unpack the current binaries in your $HOME directory; set the AFNI binary directory name to $HOME/abin/; and add that location to the $PATH in both ~/.cshrc and ~/.bashrc.

折腾了十几分钟无用功。而实际上,只要将环境变量更新,就可以找到suma命令。

export PATH=/home/fsluser/Antsbin/bin:$PATH

但随后执行

(base) [fsluser@fsl ~]$ suma -update_env
suma: error while loading shared libraries: libGLw.so.1: cannot open shared object file: No such file or directory

还是报错,缺少依赖关系。根据官方的论坛提示,重新下载了包,命令就可以正常执行了。

(base) [fsluser@fsl ~]$ sudo yum install -y   mesa-libGLw mesa-libGLU

紧接着安装R,经过长时间的下载和配置,最终也报了很多包依赖关系的错误。

/bin/sh ../libtool  --tag=CC   --mode=link g++ -m64 -std=gnu++11  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic   -o libutil.la  mt19937ar.lo sobolseq.lo timer.lo stop.lo redblack.lo qsort_r.lo rescale.lo  -lm 
libtool: link: ERROR: no information for variable 'AR' cru .libs/libutil.a .libs/mt19937ar.o .libs/sobolseq.o .libs/timer.o .libs/stop.o .libs/redblack.o .libs/qsort_r.o .libs/rescale.o 
../libtool: line 1102: ERROR:: command not found
make[2]: *** [libutil.la] Error 127
make[2]: Leaving directory `/tmp/Rtmpdkk37t/R.INSTALL383c1f9e7cbf/nloptr/src/nlopt_src/util'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/Rtmpdkk37t/R.INSTALL383c1f9e7cbf/nloptr/src/nlopt_src'
make: *** [all] Error 2
ERROR: configuration failed for package ‘nloptr’
* removing ‘/home/fsluser/R/nloptr’
ERROR: dependencies ‘curl’, ‘openssl’ are not available for package ‘httr’
* removing ‘/home/fsluser/R/httr’
ERROR: dependency ‘curl’ is not available for package ‘rio’
* removing ‘/home/fsluser/R/rio’
ERROR: dependency ‘curl’ is not available for package ‘V8’
* removing ‘/home/fsluser/R/V8’
ERROR: dependencies ‘curl’, ‘openssl’ are not available for package ‘rsconnect’
* removing ‘/home/fsluser/R/rsconnect’
ERROR: dependency ‘igraph’ is not available for package ‘threejs’
* removing ‘/home/fsluser/R/threejs’
ERROR: dependency ‘units’ is not available for package ‘sf’
* removing ‘/home/fsluser/R/sf’
ERROR: dependency ‘nloptr’ is not available for package ‘lme4’
* removing ‘/home/fsluser/R/lme4’
ERROR: dependencies ‘png’, ‘jpeg’ are not available for package ‘latticeExtra’
* removing ‘/home/fsluser/R/latticeExtra’
ERROR: dependency ‘gsl’ is not available for package ‘rtdists’
* removing ‘/home/fsluser/R/rtdists’
ERROR: dependency ‘cubature’ is not available for package ‘MCMCglmm’
* removing ‘/home/fsluser/R/MCMCglmm’
ERROR: dependencies ‘xml2’, ‘httr’ are not available for package ‘rvest’
* removing ‘/home/fsluser/R/rvest’
ERROR: dependency ‘httr’ is not available for package ‘plotly’
* removing ‘/home/fsluser/R/plotly’
ERROR: dependency ‘lme4’ is not available for package ‘gamm4’
* removing ‘/home/fsluser/R/gamm4’
ERROR: dependency ‘latticeExtra’ is not available for package ‘Hmisc’
* removing ‘/home/fsluser/R/Hmisc’
ERROR: dependency ‘lme4’ is not available for package ‘pbkrtest’
* removing ‘/home/fsluser/R/pbkrtest’
ERROR: dependency ‘lme4’ is not available for package ‘mlmRev’
* removing ‘/home/fsluser/R/mlmRev’
ERROR: dependency ‘lme4’ is not available for package ‘MEMSS’
* removing ‘/home/fsluser/R/MEMSS’
ERROR: dependency ‘lme4’ is not available for package ‘effects’
* removing ‘/home/fsluser/R/effects’
ERROR: dependency ‘lme4’ is not available for package ‘glmmTMB’
* removing ‘/home/fsluser/R/glmmTMB’
ERROR: dependency ‘V8’ is not available for package ‘rstan’
* removing ‘/home/fsluser/R/rstan’
ERROR: dependency ‘sf’ is not available for package ‘spdep’
* removing ‘/home/fsluser/R/spdep’
ERROR: dependency ‘lme4’ is not available for package ‘lmerTest’
* removing ‘/home/fsluser/R/lmerTest’
ERROR: dependencies ‘httr’, ‘rvest’, ‘xml2’ are not available for package ‘tidyverse’
* removing ‘/home/fsluser/R/tidyverse’
ERROR: dependencies ‘pbkrtest’, ‘rio’, ‘lme4’ are not available for package ‘car’
* removing ‘/home/fsluser/R/car’
ERROR: dependency ‘plotly’ is not available for package ‘ggResidpanel’
* removing ‘/home/fsluser/R/ggResidpanel’
ERROR: dependencies ‘rsconnect’, ‘rstan’, ‘threejs’ are not available for package ‘shinystan’
* removing ‘/home/fsluser/R/shinystan’
ERROR: dependencies ‘lme4’, ‘Hmisc’ are not available for package ‘arm’
* removing ‘/home/fsluser/R/arm’
ERROR: dependency ‘car’ is not available for package ‘rstatix’
* removing ‘/home/fsluser/R/rstatix’
ERROR: dependencies ‘lme4’, ‘rstan’, ‘shinystan’ are not available for package ‘rstanarm’
* removing ‘/home/fsluser/R/rstanarm’
ERROR: dependencies ‘lme4’, ‘tidyverse’, ‘gamm4’ are not available for package ‘projpred’
* removing ‘/home/fsluser/R/projpred’
ERROR: dependencies ‘lme4’, ‘pbkrtest’, ‘lmerTest’, ‘car’ are not available for package ‘afex’
* removing ‘/home/fsluser/R/afex’
ERROR: dependency ‘car’ is not available for package ‘phia’
* removing ‘/home/fsluser/R/phia’
ERROR: dependency ‘rstatix’ is not available for package ‘ggpubr’
* removing ‘/home/fsluser/R/ggpubr’
ERROR: dependencies ‘rstan’, ‘shinystan’, ‘projpred’ are not available for package ‘brms’
* removing ‘/home/fsluser/R/brms’

The downloaded source packages are in
	‘/tmp/RtmpsSHv4W/downloaded_packages’

++ Note:  @ 16:22:48
   	This package has been installed on the computer: afex
	This package has been installed on the computer: phia
	This package has been installed on the computer: lmerTest
	This package has been installed on the computer: brms

There were 44 warnings (use warnings() to see them)

根据GitHub上的建议,我在R环境中,手动安装nloptr包。

install.packages("nloptr")

但仍然不成功,报错缺少libtool的link。

libtool: link: ERROR: no information for variable 'AR' cru .libs/libutil.a .libs/mt19937ar.o .libs/sobolseq.o .libs/timer.o .libs/stop.o .libs/redblack.o .libs/qsort_r.o .libs/rescale.o 
../libtool: line 1102: ERROR:: command not found
make[2]: *** [libutil.la] Error 127
make[2]: Leaving directory `/tmp/RtmpWWS18t/R.INSTALL49983990066e/nloptr/src/nlopt_src/util'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/RtmpWWS18t/R.INSTALL49983990066e/nloptr/src/nlopt_src'
make: *** [all] Error 2
ERROR: configuration failed for package ‘nloptr’
* removing ‘/usr/lib64/R/library/nloptr’

The downloaded source packages are in
	‘/tmp/RtmpiYvBm8/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("nloptr") :
  installation of package ‘nloptr’ had non-zero exit status

后来,看到stackoverflow上多条意见都指向了R包的版本不一致问题,如链接一链接二,和链接三。最终根据建议,手动指定安装包的版本,nloptr包在R中就能被成功安装。

packageurl <- "https://cran.r-project.org/src/contrib/Archive/nloptr/nloptr_1.2.1.tar.gz";  install.packages(packageurl, repos=NULL, type="source");
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值