CentOS安装R软件包RLumShiny失败

tez616oj  于 2022-11-07  发布在  其他
关注(0)|答案(1)|浏览(265)

我试着在服务器上安装闪亮的相关软件包RLumShiny。系统版本:CentOS Linux版本8.1.1911(核心)
我试着用途:

install.packages("RLumShiny")

返回了一些错误。但我现在找不到这些错误。
然后我厌倦地使用:

wget https://cran.r-project.org/bin/macosx/contrib/4.1/RLumShiny_0.2.2.tgz
R CMD INSTALL RLumShiny_0.2.2.tgz
R
library("RLumShiny")

服务器报告了一个错误:

>library(RLumShiny)
Error: package or namespace load failed for ‘RLumShiny’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/shiny/R/x86_64-redhat-linux-gnu-library/4.1/terra/libs/terra.so':
  /home/shiny/R/x86_64-redhat-linux-gnu-library/4.1/terra/libs/terra.so: invalid ELF header

然后我试着:

>install.packages("RLumShiny")
Installing package into ‘/home/shiny/R/x86_64-redhat-linux-gnu-library/4.1’
(as ‘lib’ is unspecified)
try open URL'https://mirror-hk.koddos.net/CRAN/src/contrib/RLumShiny_0.2.2.tar.gz'
Content type 'application/x-gzip' length 448539 bytes (438 KB)
==================================================
downloaded 438 KB

installing *source* package ‘RLumShiny’ ...
package ‘RLumShiny’ successfully unpacked and MD5 sums checked
using staged installation
R
inst
byte-compile and prepare package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/home/shiny/R/x86_64-redhat-linux-gnu-library/4.1/terra/libs/terra.so':
  /home/shiny/R/x86_64-redhat-linux-gnu-library/4.1/terra/libs/terra.so: invalid ELF header
Calls: <Anonymous> ... namespaceImport -> loadNamespace -> library.dynam -> dyn.load
Execution halted
ERROR: lazy loading failed for package ‘RLumShiny’

* removing ‘/home/shiny/R/x86_64-redhat-linux-gnu-library/4.1/RLumShiny’
* restoring previous ‘/home/shiny/R/x86_64-redhat-linux-gnu-library/4.1/RLumShiny’

The downloaded source packages are in
    ‘/tmp/RtmpZxd0sL/downloaded_packages’
Warning message:
In install.packages("RLumShiny") :
  installation of package ‘RLumShiny’ had non-zero exit status

如何解决这个问题?

daupos2t

daupos2t1#

这个问题很明显是terra包的问题,所以修复的方法是先(重新)安装这个包;可能是在安装其系统需求(请参阅repo)之后,可能是使用
sudo dnf install gdal-devel proj-devel geos-devel sqlite-devel

相关问题