如何修复R中phytools软件包的安装错误?

时间:2019-05-06 10:25:37

标签: r ubuntu-18.04 bioconductor

我一直试图通过r studio和终端在R(R版本= 3.6.0,OS = Ubuntu 18.04.2 LTS)中安装phytools软件包,但出现错误。

>install.packages("phytools")

Installing package into ‘/home/ga/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependencies ‘magick’, ‘animation’

trying URL 'https://cloud.r-project.org/src/contrib/magick_2.0.tar.gz'
Content type 'application/x-gzip' length 4998781 bytes (4.8 MB)
==================================================
downloaded 4.8 MB

trying URL 'https://cloud.r-project.org/src/contrib/animation_2.6.tar.gz'
Content type 'application/x-gzip' length 301531 bytes (294 KB)
==================================================
downloaded 294 KB

trying URL 'https://cloud.r-project.org/src/contrib/phytools_0.6-60.tar.gz'
Content type 'application/x-gzip' length 268613 bytes (262 KB)
==================================================
downloaded 262 KB

* installing *source* package ‘magick’ ...
** package ‘magick’ successfully unpacked and MD5 sums checked
** using 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 ERROR ---------------------------
Configuration failed because Magick++ was not found. Try installing:
 - deb: 'libmagick++-dev' (Debian, Ubuntu)
 - rpm: 'ImageMagick-c++-devel' (Fedora, CentOS, RHEL)
 - csw: 'imagemagick_dev' (Solaris)
On MacOS it is recommended to use install ImageMagick-6 from homebrew
with extra support for fontconfig and rsvg rendering:
   brew reinstall imagemagick@6 --with-fontconfig --with-librsvg
For older Ubuntu versions Trusty (14.04) and Xenial (16.04) use our PPA:
   sudo add-apt-repository -y ppa:opencpu/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: configuration failed for package ‘magick’
* removing ‘/home/ga/R/x86_64-pc-linux-gnu-library/3.6/magick’
Warning in install.packages :
  installation of package ‘magick’ had non-zero exit status
ERROR: dependency ‘magick’ is not available for package ‘animation’
* removing ‘/home/ga/R/x86_64-pc-linux-gnu-library/3.6/animation’
Warning in install.packages :
  installation of package ‘animation’ had non-zero exit status
ERROR: dependency ‘animation’ is not available for package ‘phytools’
* removing ‘/home/ga/R/x86_64-pc-linux-gnu-library/3.6/phytools’
Warning in install.packages :
  installation of package ‘phytools’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpFZWnB0/downloaded_packages’

并且,我在终端中尝试了以下命令

在r终端中

$ sudo apt-get install r-cran-phytools

并显示错误,如下所示:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 r-cran-phytools : Depends: r-api-3.4
                   Depends: r-cran-ape (>= 4.0) but it is not going to be installed
                   Depends: r-cran-maps but it is not going to be installed
                   Depends: r-cran-animation but it is not going to be installed
                   Depends: r-cran-clustergeneration but it is not going to be installed
                   Depends: r-cran-coda but it is not going to be installed
                   Depends: r-cran-combinat but it is not going to be installed
                   Depends: r-cran-mnormt but it is not going to be installed
                   Depends: r-cran-msm but it is not going to be installed
                   Depends: r-cran-numderiv but it is not going to be installed
                   Depends: r-cran-phangorn (>= 2.3.1) but it is not going to be installed
                   Depends: r-cran-plotrix but it is not going to be installed
                   Depends: r-cran-scatterplot3d but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

0 个答案:

没有答案