[英]Installing magick package in RStudio server
I used install.packages('magick') in RStudio Server.我在 RStudio 服务器中使用了 install.packages('magick')。 BUT it gave the error:但它给出了错误:
Error: package or namespace load failed for ‘magick’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-magick/00new/magick/libs/magick.so':
/home/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-magick/00new/magick/libs/magick.so: undefined symbol: _ZN6Magick5Image5writeEPNS_4BlobERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm
I think the problem is that different version used:我认为问题在于使用了不同的版本:
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-fopenmp -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=0 -I/usr/local/include/ImageMagick-7 -I/usr/include/ImageMagick-6
Using PKG_LIBS=-lMagick++-7.Q16HDRI -lMagickWand-6.Q16 -lMagickCore-6.Q16
How can I change the same version?如何更改相同的版本? I think the ImageMagick-6 is installed.我认为 ImageMagick-6 已安装。 THANKS: My R Info:谢谢: 我的 R 信息:
sessionInfo()
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS: /opt/spack/opt/spack/linux-centos7-x86_64/gcc-9.2.0/r-3.6.3-utjqqasrybg775sebpzql7gfnmtfwqey/rlib/R/lib/libRblas.so
LAPACK: /opt/spack/opt/spack/linux-centos7-x86_64/gcc-9.2.0/r-3.6.3-utjqqasrybg775sebpzql7gfnmtfwqey/rlib/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.3 tools_3.6.3
Now it can be use the same version of Imagemagick, but it still showed error:现在可以使用同版本的Imagemagick,但还是报错:
Error: package or namespace load failed for ‘magick’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-magick/00new/magick/libs/magick.so':
/home/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-magick/00new/magick/libs/magick.so: undefined symbol: _ZN6Magick5Image5writeEPNS_4BlobERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/R/x86_64-pc-linux-gnu-library/3.6/magick’
And other information:和其他信息:
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/ImageMagick-6
Using PKG_LIBS=-lMagick++-6.Q16 -lMagickWand-6.Q16 -lMagickCore-6.Q16
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.