You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
在安装 Y 叔的 yyplot 时候,发现 magick 依赖包安装的时候的一些棘手问题,特此记录一下。
R-4.0.3 安装
> library(remotes)
>remotes::install_github("GuangchuangYu/yyplot")
...*installing*source*package ‘magick’ ...**package ‘magick’ successfullyunpackedandMD5sumschecked**usingstagedinstallationPackageMagick++wasnotfoundinthepkg-configsearchpath.Perhapsyoushouldaddthedirectorycontaining `Magick++.pc'to the PKG_CONFIG_PATH environment variableNo package 'Magick++' foundUsing PKG_CFLAGS=Using PKG_LIBS=-lMagick++-6.Q16 -lMagickWand-6.Q16 -lMagickCore-6.Q16--------------------------- [ANTICONF] --------------------------------Configuration failed to find the Magick++ library. Try installing: - deb: libmagick++-dev (Debian, Ubuntu) - rpm: ImageMagick-c++-devel (Fedora, CentOS, RHEL) - brew: imagemagick or imagemagick@6 (MacOS)If Magick++ is already installed, check that 'pkg-config' is in yourPATH and PKG_CONFIG_PATH contains a Magick++.pc file. If pkg-configis unavailable you can set INCLUDE_DIR and LIB_DIR manually via:R CMD INSTALL --configure-vars='INCLUDE_DIR=...LIB_DIR=...'-------------------------- [ERROR MESSAGE] ---------------------------<stdin>:1:22: fatal error: Magick++.h: No such file or directorycompilation terminated.--------------------------------------------------------------------ERROR: configuration failed for package ‘magick’* removing ‘/home/shenweiyan/software/R/R-4.0.3/lib64/R/library/magick’Error: Failed to install 'yyplot' from GitHub: (converted from warning) installation of package ‘magick’ had non-zero exit status> quit()Save workspace image? [y/n/c]: n
wget https://download.imagemagick.org/archive/releases/ImageMagick-7.0.10-24.tar.xz
extract ImageMagick-7.0.10-24.tar.xz
cd ImageMagick-7.0.10-24
./configure CC=/home/shenweiyan/software/gcc-7.3.0/bin/gcc CXX=/home/shenweiyan/software/gcc-7.3.0/bin/g++ --prefix=/home/shenweiyan/software/ImageMagick-7.0.10-24
make
make install
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
在安装 Y 叔的
yyplot
时候,发现magick
依赖包安装的时候的一些棘手问题,特此记录一下。R-4.0.3 安装
仅在 Bash 环境配置了
PATH
和PKG_CONFIG_PATH
是不够的,安装过程会提示动态库的问题。最终解决方案:
ggimage_0.3.1
。meme
包,然后再安装yyplot
。R-4.3.0 安装
R-4.3.0 安装
magick_2.8.4
会出现 ropensci/magick#166 的问题。根据 ropensci/magick#166#issuecomment-457875591 的描述,编译 ImageMagick 的 gcc 需要跟编译 R 的 gcc 保持版本一致。wget https://download.imagemagick.org/archive/releases/ImageMagick-7.0.10-24.tar.xz extract ImageMagick-7.0.10-24.tar.xz cd ImageMagick-7.0.10-24 ./configure CC=/home/shenweiyan/software/gcc-7.3.0/bin/gcc CXX=/home/shenweiyan/software/gcc-7.3.0/bin/g++ --prefix=/home/shenweiyan/software/ImageMagick-7.0.10-24 make make install
magick
包meme
包,然后再安装yyplot
。Beta Was this translation helpful? Give feedback.
All reactions