在 dyn.load(文件,DLLpath = DLLpath,...)中安装“magick”时出错:无法加载共享对象

error installing ‘magick’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object

我正在使用 Fedora 32 和从源代码编译的 R 4.0.2。我无法安装 magick,但我需要它,因为它在很多包中都被用作依赖项。 我搜索了类似的问题,但在这种情况下答案不起作用。我可以毫无问题地安装 Rcpp、tidyverse (which)。我与 stringr 有类似的问题,我修复了它 [this][1](我用 2.4.0.tgz 尝试了这个解决方案,但我得到了同样的错误)。

> library(devtools)
Loading required package: usethis
> install_github("ropensci/magick", INSTALL_opts = "--no-lock")
Downloading GitHub repo ropensci/magick@master
✔  checking for file ‘/tmp/RtmpszRbzI/remotes771705a39e0da/ropensci-magick-0f18cd6/DESCRIPTION’ ...
─  preparing ‘magick’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  running ‘cleanup’
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘magick_2.4.0.9000.tar.gz’
   
Installing package into ‘/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0’
(as ‘lib’ is unspecified)
* installing *source* package ‘magick’ ...
staged installation is only possible with locking
** using non-staged installation
Found pkg-config cflags and libs!
Using PKG_CFLAGS=-I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 
Using PKG_LIBS=-lMagick++-6.Q16 -lMagickWand-6.Q16 -lMagickCore-6.Q16 
** libs
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c animation.cpp -o animation.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c attributes.cpp -o attributes.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c base.cpp -o base.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c color.cpp -o color.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c composite.cpp -o composite.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c config.cc -o config.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c convolve.cpp -o convolve.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c device.cpp -o device.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c edges.cpp -o edges.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c edit.cpp -o edit.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c fonts.cpp -o fonts.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c options.cpp -o options.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c properties.cpp -o properties.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c resize.cpp -o resize.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c segment.cpp -o segment.o
g++ -std=gnu++11 -I"/home/andrespara/4.0.2/lib64/R/include" -DNDEBUG -I/usr/include/ImageMagick-6 -fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16  -I'/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/Rcpp/include' -I/usr/local/include  -fvisibility=hidden -fpic  -g -O2  -c transformations.cpp -o transformations.o
g++ -std=gnu++11 -shared -L/home/andrespara/4.0.2/lib64/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/andrespara/anaconda3/lib -Wl,-rpath-link,/home/andrespara/anaconda3/lib -L/home/andrespara/anaconda3/lib -o magick.so RcppExports.o animation.o attributes.o base.o color.o composite.o config.o convolve.o device.o edges.o edit.o fonts.o options.o properties.o resize.o segment.o transformations.o -lMagick++-6.Q16 -lMagickWand-6.Q16 -lMagickCore-6.Q16 -L/home/andrespara/4.0.2/lib64/R/lib -lR
installing to /home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/magick/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error: package or namespace load failed for ‘magick’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/magick/libs/magick.so':
  /lib64/libraqm.so.0: undefined symbol: hb_buffer_set_invisible_glyph
Error: loading failed
Ejecución interrumpida
ERROR: loading failed
* removing ‘/home/andrespara/R/x86_64-pc-linux-gnu-library/4.0/magick’
Error: Failed to install 'magick' from GitHub:
  (convertido del aviso) installation of package ‘/tmp/RtmpszRbzI/file771704f51e0f0/magick_2.4.0.9000.tar.gz’ had non-zero exit status

这是我安装 ImageMagick 的方式

(base) [andres] sudo dnf install ImageMagick-c++-devel                                
[sudo] password for andrespara: 
Última comprobación de caducidad de metadatos hecha hace 0:54:23, el mar 07 jul 2020 12:53:15.
Dependencias resueltas.
=======================================================================================
 Paquete                    Arq.        Versión                     Repositorio   Tam.
=======================================================================================
Instalando:
 ImageMagick-c++-devel      x86_64      1:6.9.10.86-2.fc32          fedora        92 k
Instalando dependencias:
 ImageMagick                x86_64      1:6.9.10.86-2.fc32          fedora       160 k
 ImageMagick-c++            x86_64      1:6.9.10.86-2.fc32          fedora       184 k
 ImageMagick-devel          x86_64      1:6.9.10.86-2.fc32          fedora        93 k
 ImageMagick-libs           x86_64      1:6.9.10.86-2.fc32          fedora       2.3 M
 OpenEXR-devel              x86_64      2.3.0-5.fc32                fedora        76 k
 gl-manpages                noarch      1.1-20.20190306.fc32        fedora       1.0 M
 ilmbase-devel              x86_64      2.3.0-4.fc32                fedora        85 k
 jasper-devel               x86_64      2.0.16-2.fc32               fedora       396 k
 lcms2-devel                x86_64      2.9-7.fc32                  fedora       6.1 M
 libgs-devel                x86_64      9.52-3.fc32                 updates       19 k
 liblqr-1                   x86_64      0.4.2-14.fc32               fedora        50 k
 mesa-libGLU                x86_64      9.0.1-2.fc32                fedora       190 k
 mesa-libGLU-devel          x86_64      9.0.1-2.fc32                fedora        13 k

Resumen de la transacción
=======================================================================================
Instalar  14 Paquetes

Tamaño total de la descarga: 11 M
Tamaño instalado: 21 M
¿Está de acuerdo [s/N]?: y
Descargando paquetes:
(1/14): libgs-devel-9.52-3.fc32.x86_64.rpm             109 kB/s |  19 kB     00:00    
(2/14): ImageMagick-c++-6.9.10.86-2.fc32.x86_64.rpm    605 kB/s | 184 kB     00:00    
(3/14): ImageMagick-6.9.10.86-2.fc32.x86_64.rpm        468 kB/s | 160 kB     00:00    
(4/14): ImageMagick-c++-devel-6.9.10.86-2.fc32.x86_64. 542 kB/s |  92 kB     00:00    
(5/14): ImageMagick-devel-6.9.10.86-2.fc32.x86_64.rpm  1.2 MB/s |  93 kB     00:00    
(6/14): OpenEXR-devel-2.3.0-5.fc32.x86_64.rpm          522 kB/s |  76 kB     00:00    
(7/14): ilmbase-devel-2.3.0-4.fc32.x86_64.rpm          611 kB/s |  85 kB     00:00    
(8/14): jasper-devel-2.0.16-2.fc32.x86_64.rpm          793 kB/s | 396 kB     00:00    
(9/14): gl-manpages-1.1-20.20190306.fc32.noarch.rpm    1.1 MB/s | 1.0 MB     00:00    
(10/14): liblqr-1-0.4.2-14.fc32.x86_64.rpm             641 kB/s |  50 kB     00:00    
(11/14): mesa-libGLU-9.0.1-2.fc32.x86_64.rpm           511 kB/s | 190 kB     00:00    
(12/14): mesa-libGLU-devel-9.0.1-2.fc32.x86_64.rpm     185 kB/s |  13 kB     00:00    
(13/14): ImageMagick-libs-6.9.10.86-2.fc32.x86_64.rpm  591 kB/s | 2.3 MB     00:03    
(14/14): lcms2-devel-2.9-7.fc32.x86_64.rpm             820 kB/s | 6.1 MB     00:07    
---------------------------------------------------------------------------------------
Total                                                  1.0 MB/s |  11 MB     00:11     
Ejecutando verificación de operación
Verificación de operación exitosa.
Ejecutando prueba de operaciones
Prueba de operación exitosa.
Ejecutando operación
  Preparando          :                                                            1/1 
  Instalando          : liblqr-1-0.4.2-14.fc32.x86_64                             1/14 
  Instalando          : ImageMagick-libs-1:6.9.10.86-2.fc32.x86_64                2/14 
  Instalando          : ImageMagick-1:6.9.10.86-2.fc32.x86_64                     3/14 
  Instalando          : ImageMagick-c++-1:6.9.10.86-2.fc32.x86_64                 4/14 
  Instalando          : mesa-libGLU-9.0.1-2.fc32.x86_64                           5/14 
  Instalando          : lcms2-devel-2.9-7.fc32.x86_64                             6/14 
  Instalando          : jasper-devel-2.0.16-2.fc32.x86_64                         7/14 
  Instalando          : gl-manpages-1.1-20.20190306.fc32.noarch                   8/14 
  Instalando          : mesa-libGLU-devel-9.0.1-2.fc32.x86_64                     9/14 
  Instalando          : ilmbase-devel-2.3.0-4.fc32.x86_64                        10/14 
  Instalando          : OpenEXR-devel-2.3.0-5.fc32.x86_64                        11/14 
  Instalando          : libgs-devel-9.52-3.fc32.x86_64                           12/14 
  Instalando          : ImageMagick-devel-1:6.9.10.86-2.fc32.x86_64              13/14 
  Instalando          : ImageMagick-c++-devel-1:6.9.10.86-2.fc32.x86_64          14/14 
  Ejecutando scriptlet: ImageMagick-c++-devel-1:6.9.10.86-2.fc32.x86_64          14/14 
  Verificando         : libgs-devel-9.52-3.fc32.x86_64                            1/14 
  Verificando         : ImageMagick-1:6.9.10.86-2.fc32.x86_64                     2/14 
  Verificando         : ImageMagick-c++-1:6.9.10.86-2.fc32.x86_64                 3/14 
  Verificando         : ImageMagick-c++-devel-1:6.9.10.86-2.fc32.x86_64           4/14 
  Verificando         : ImageMagick-devel-1:6.9.10.86-2.fc32.x86_64               5/14 
  Verificando         : ImageMagick-libs-1:6.9.10.86-2.fc32.x86_64                6/14 
  Verificando         : OpenEXR-devel-2.3.0-5.fc32.x86_64                         7/14 
  Verificando         : gl-manpages-1.1-20.20190306.fc32.noarch                   8/14 
  Verificando         : ilmbase-devel-2.3.0-4.fc32.x86_64                         9/14 
  Verificando         : jasper-devel-2.0.16-2.fc32.x86_64                        10/14 
  Verificando         : lcms2-devel-2.9-7.fc32.x86_64                            11/14 
  Verificando         : liblqr-1-0.4.2-14.fc32.x86_64                            12/14 
  Verificando         : mesa-libGLU-9.0.1-2.fc32.x86_64                          13/14 
  Verificando         : mesa-libGLU-devel-9.0.1-2.fc32.x86_64                    14/14 

Instalado:
  ImageMagick-1:6.9.10.86-2.fc32.x86_64                                                
  ImageMagick-c++-1:6.9.10.86-2.fc32.x86_64                                            
  ImageMagick-c++-devel-1:6.9.10.86-2.fc32.x86_64                                      
  ImageMagick-devel-1:6.9.10.86-2.fc32.x86_64                                          
  ImageMagick-libs-1:6.9.10.86-2.fc32.x86_64                                           
  OpenEXR-devel-2.3.0-5.fc32.x86_64                                                    
  gl-manpages-1.1-20.20190306.fc32.noarch                                              
  ilmbase-devel-2.3.0-4.fc32.x86_64                                                    
  jasper-devel-2.0.16-2.fc32.x86_64                                                    
  lcms2-devel-2.9-7.fc32.x86_64                                                        
  libgs-devel-9.52-3.fc32.x86_64                                                       
  liblqr-1-0.4.2-14.fc32.x86_64                                                        
  mesa-libGLU-9.0.1-2.fc32.x86_64                                                      
  mesa-libGLU-devel-9.0.1-2.fc32.x86_64   

我无法为此下载 rpm,出现此错误:

wget https://fedora.pkgs.org/32/fedora-x86_64/ImageMagick-c++-devel-6.9.10.86-2.fc32.x86_64.rpm.html
--2020-07-07 14:06:29--  https://fedora.pkgs.org/32/fedora-x86_64/ImageMagick-c++-devel-6.9.10.86-2.fc32.x86_64.rpm.html
Resolviendo fedora.pkgs.org (fedora.pkgs.org)... 46.4.72.43
Conectando con fedora.pkgs.org (fedora.pkgs.org)[46.4.72.43]:443... conectado.
Petición HTTP enviada, esperando respuesta... 403 Forbidden
2020-07-07 14:06:30 ERROR 403: Forbidden.

抱歉,如果之前有人问过这个问题,但我正在循环尝试很多解决方案,其中 none 个都有效。谢谢。

这里是 sessionInfo()

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Generic 32 (Generic)

Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblas-r0.3.9.so

locale:
 [1] LC_CTYPE=es_UY.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=es_UY.UTF-8        LC_COLLATE=es_UY.UTF-8    
 [5] LC_MONETARY=es_UY.UTF-8    LC_MESSAGES=es_UY.UTF-8   
 [7] LC_PAPER=es_UY.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=es_UY.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] devtools_2.3.0.9000 usethis_1.6.1      

loaded via a namespace (and not attached):
 [1] magrittr_1.5      pkgload_1.1.0     R6_2.4.1          rlang_0.4.6      
 [5] fansi_0.4.1       tools_4.0.2       pkgbuild_1.0.8    sessioninfo_1.1.1
 [9] cli_2.0.2         withr_2.2.0       ellipsis_0.3.1    remotes_2.1.1    
[13] assertthat_0.2.1  digest_0.6.25     rprojroot_1.3-2   crayon_1.3.4     
[17] processx_3.4.3    callr_3.4.3       fs_1.4.2          ps_1.3.3         
[21] curl_4.3          testthat_2.3.2    memoise_1.1.0     glue_1.4.1       
[25] compiler_4.0.2    desc_1.2.0        backports_1.1.8   prettyunits_1.1.1



  [1]: 

发布或安装似乎有些奇怪,我下载了补丁版本 4.0.2 form here and I followed these instructions [就像我以前做的那样!] 并且它有效(看起来它 compiled/installed 使用 install.packages.

时没有额外的参数,虽然我没有测量它,但一切都稍微快一点