Installation of `magick` on 🚩🇨🇳🏹红旗中科 RedFlag Linux (🍥Debian 11)
englianhu opened this issue · 2 comments
englianhu commented
sudo su - -c "R -e \"install.packages('magick', repos = 'https://cran.rstudio.com', lib = '/usr/lib/R/library', dependencies = TRUE, INSTALL_opts = '--no-lock')\""
R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R是自由软件,不带任何担保。
在某些条件下你可以将其自由散布。
用'license()'或'licence()'来看散布的详细条件。
R是个合作计划,有许多人为之做出了贡献.
用'contributors()'来看合作者的详细情况
用'citation()'会告诉你如何在出版物中正确地引用R或R程序包。
用'demo()'来看一些示范程序,用'help()'来阅读在线帮助文件,或
用'help.start()'通过HTML浏览器来看帮助文件。
用'q()'退出R.
> install.packages('magick', repos = 'https://cran.rstudio.com', lib = '/usr/lib/R/library', dependencies = TRUE, INSTALL_opts = '--no-lock')
还安装相依关系‘av’, ‘rsvg’, ‘pdftools’, ‘tesseract’, ‘gifski’
试开URL’https://cran.rstudio.com/src/contrib/av_0.8.1.tar.gz'
Content type 'application/x-gzip' length 752279 bytes (734 KB)
==================================================
downloaded 734 KB
试开URL’https://cran.rstudio.com/src/contrib/rsvg_2.3.1.tar.gz'
Content type 'application/x-gzip' length 182528 bytes (178 KB)
==================================================
downloaded 178 KB
试开URL’https://cran.rstudio.com/src/contrib/pdftools_3.3.0.tar.gz'
Content type 'application/x-gzip' length 936172 bytes (914 KB)
==================================================
downloaded 914 KB
试开URL’https://cran.rstudio.com/src/contrib/tesseract_5.1.0.tar.gz'
Content type 'application/x-gzip' length 445874 bytes (435 KB)
==================================================
downloaded 435 KB
试开URL’https://cran.rstudio.com/src/contrib/gifski_1.6.6-1.tar.gz'
Content type 'application/x-gzip' length 16543 bytes (16 KB)
==================================================
downloaded 16 KB
试开URL’https://cran.rstudio.com/src/contrib/magick_2.7.3.tar.gz'
Content type 'application/x-gzip' length 4813163 bytes (4.6 MB)
==================================================
downloaded 4.6 MB
* installing *source* package ‘av’ ...
** 成功将‘av’程序包解包并MD5和检查
staged installation is only possible with locking
** using non-staged installation
Using PKG_CFLAGS=
Using PKG_LIBS=-lavfilter
-----------------------------[ ANTICONF ]----------------------------------
Configuration failed to find the libavfilter library. Try installing:
* deb: libavfilter-dev (Debian, Ubuntu 18.04 and up)
* rpm: ffmpeg-devel (https://rpmfusion.org) (Fedora, CentOS, RHEL)
* csw: ffmpeg_dev (Solaris)
* brew: ffmpeg (MacOS)
For Ubuntu Trusty (14.04) and Xenial (16.04) use this PPA:
sudo add-apt-repository -y ppa:cran/ffmpeg-3
sudo apt-get update
sudo apt-get install -y libavfilter-dev
If libavfilter is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a libavfilter.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
---------------------------[ ERROR MESSAGE ]--------------------------------
<stdin>:1:10: fatal error: libavfilter/version.h: 没有那个文件或目录
compilation terminated.
----------------------------------------------------------------------------
ERROR: configuration failed for package ‘av’
* removing ‘/usr/lib/R/library/av’
* installing *source* package ‘rsvg’ ...
** 成功将‘rsvg’程序包解包并MD5和检查
staged installation is only possible with locking
** using non-staged installation
Package librsvg-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `librsvg-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'librsvg-2.0' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lrsvg
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the librsvg-2.0 library. Try installing:
* deb: librsvg2-dev (Debian, Ubuntu, etc)
* rpm: librsvg2-devel (Fedora, EPEL)
* csw: librsvg_dev, sunx11_devel (Solaris)
* brew: librsvg (OSX)
If librsvg-2.0 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a librsvg-2.0.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: fatal error: librsvg/rsvg.h: 没有那个文件或目录
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘rsvg’
* removing ‘/usr/lib/R/library/rsvg’
* installing *source* package ‘pdftools’ ...
** 成功将‘pdftools’程序包解包并MD5和检查
staged installation is only possible with locking
** using non-staged installation
Package poppler-cpp was not found in the pkg-config search path.
Perhaps you should add the directory containing `poppler-cpp.pc'
to the PKG_CONFIG_PATH environment variable
No package 'poppler-cpp' found
Using PKG_CFLAGS=-I/usr/include/poppler/cpp -I/usr/include/poppler
Using PKG_LIBS=-lpoppler-cpp
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find 'poppler-cpp' system library. Try installing:
* rpm: poppler-cpp-devel (Fedora, CentOS, RHEL)
* brew: poppler (MacOS)
* deb: libpoppler-cpp-dev (Debian, Ubuntu, etc)
* On Ubuntu 16.04 or 18.04 use this PPA:
sudo add-apt-repository -y ppa:cran/poppler
sudo apt-get update
sudo apt-get install -y libpoppler-cpp-dev
If poppler-cpp is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a poppler-cpp.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: fatal error: poppler-document.h: 没有那个文件或目录
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘pdftools’
* removing ‘/usr/lib/R/library/pdftools’
* installing *source* package ‘gifski’ ...
** 成功将‘gifski’程序包解包并MD5和检查
staged installation is only possible with locking
** using non-staged installation
./configure: 6: ./configure: cargo: not found
------------------ RUST COMPILER NOT FOUND --------------------
Cargo was not found on the PATH. Please install cargo / rustc:
- yum install cargo (Fedora/CentOS)
- apt-get install cargo (Debian/Ubuntu)
- brew install rust (MacOS)
Alternatively install Rust from: <https://www.rust-lang.org>
---------------------------------------------------------------
ERROR: configuration failed for package ‘gifski’
* removing ‘/usr/lib/R/library/gifski’
* installing *source* package ‘magick’ ...
** 成功将‘magick’程序包解包并MD5和检查
staged installation is only possible with locking
** using non-staged installation
Package Magick++ was not found in the pkg-config search path.
Perhaps you should add the directory containing `Magick++.pc'
to the PKG_CONFIG_PATH environment variable
No package 'Magick++' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lMagick++-6.Q16
--------------------------- [ANTICONF] --------------------------------
Configuration failed to find the Magick++ library. Try installing:
- deb: libmagick++-dev (Debian, Ubuntu)
- rpm: ImageMagick-c++-devel (Fedora, CentOS, RHEL)
- csw: imagemagick_dev (Solaris)
- brew imagemagick@6 (MacOS)
For Ubuntu versions Trusty (14.04) and Xenial (16.04) use our PPA:
sudo add-apt-repository -y ppa:cran/imagemagick
sudo apt-get update
sudo apt-get install -y libmagick++-dev
If Magick++ is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a Magick++.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
-------------------------- [ERROR MESSAGE] ---------------------------
<stdin>:1:10: fatal error: Magick++.h: 没有那个文件或目录
compilation terminated.
--------------------------------------------------------------------
ERROR: configuration failed for package ‘magick’
* removing ‘/usr/lib/R/library/magick’
ERROR: dependency ‘pdftools’ is not available for package ‘tesseract’
* removing ‘/usr/lib/R/library/tesseract’
下载的程序包在
‘/tmp/RtmpP8wpHk/downloaded_packages’里
更新'.Library'里的HTML程序包列表
Making 'packages.html' ... 做完了。
Warning messages:
1: In install.packages("magick", repos = "https://cran.rstudio.com", :
安装程序包‘av’时退出狀態的值不是0
2: In install.packages("magick", repos = "https://cran.rstudio.com", :
安装程序包‘rsvg’时退出狀態的值不是0
3: In install.packages("magick", repos = "https://cran.rstudio.com", :
安装程序包‘pdftools’时退出狀態的值不是0
4: In install.packages("magick", repos = "https://cran.rstudio.com", :
安装程序包‘gifski’时退出狀態的值不是0
5: In install.packages("magick", repos = "https://cran.rstudio.com", :
安装程序包‘magick’时退出狀態的值不是0
6: In install.packages("magick", repos = "https://cran.rstudio.com", :
安装程序包‘tesseract’时退出狀態的值不是0
jeroen commented
It literally says in the output which apt libraries you are missing.
englianhu commented
sudo apt install -y libavfilter-* librsvg2* libpoppler-cpp* cargo libmagick++* libtesseract-*
## 建议安装:
sudo apt install -y librsvg2-doc libwmf-doc
## 推荐安装:
sudo apt install -y libexif-doc
sudo su - -c "R -e \"install.packages('magick', repos = 'https://cran.rstudio.com', lib = '/usr/lib/R/library', dependencies = TRUE, INSTALL_opts = '--no-lock')\""