YuLab-SMU / ggtree

:christmas_tree:Visualization and annotation of phylogenetic trees
https://yulab-smu.top/treedata-book/
830 stars 172 forks source link

Unable to install ggtree_3.2.1: object 'warning_wrap' not found #544

Closed amizeranschi closed 1 year ago

amizeranschi commented 1 year ago

Hi,

I am unable to install clusterProfiler due to missing dependency ggtree, which fails to install. I am providing the full output below, which includes the version of R that I use and the packages I'm trying to install.

Please let me know how I can get things to install properly.

BiocManager::install("clusterProfiler", ask = F, update = F)
Bioconductor version 3.14 (BiocManager 1.30.19), R 4.1.3 (2022-03-10)
Installing package(s) 'clusterProfiler'
also installing the dependencies ‘ggtree’, ‘enrichplot’

trying URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/ggtree_3.2.1.tar.gz'
Content type 'application/octet-stream' length 344549 bytes (336 KB)
==================================================
downloaded 336 KB

trying URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/enrichplot_1.14.2.tar.gz'
Content type 'application/octet-stream' length 88711 bytes (86 KB)
==================================================
downloaded 86 KB

trying URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/clusterProfiler_4.2.2.tar.gz'
Content type 'application/octet-stream' length 2659285 bytes (2.5 MB)
==================================================
downloaded 2.5 MB

* installing *source* package ‘ggtree’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in get(x, envir = ns, inherits = FALSE) : 
  object 'warning_wrap' not found
Error: unable to load R code in package ‘ggtree’
Execution halted
ERROR: lazy loading failed for package ‘ggtree’
* removing ‘/storage/bcbio_nextgen/extra3/lib/R/library/ggtree’
ERROR: dependency ‘ggtree’ is not available for package ‘enrichplot’
* removing ‘/storage/bcbio_nextgen/extra3/lib/R/library/enrichplot’
ERROR: dependency ‘enrichplot’ is not available for package ‘clusterProfiler’
* removing ‘/storage/bcbio_nextgen/extra3/lib/R/library/clusterProfiler’

The downloaded source packages are in
    ‘/tmp/RtmplHfcsQ/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning messages:
1: In install.packages(...) :
  installation of package ‘ggtree’ had non-zero exit status
2: In install.packages(...) :
  installation of package ‘enrichplot’ had non-zero exit status
3: In install.packages(...) :
  installation of package ‘clusterProfiler’ had non-zero exit status
hoondy commented 1 year ago

I am getting the same error about warning_wrap

xiangpin commented 1 year ago

This issue was caused by the newest ggplot2 (3.4.0). There are some methods to solve the problem.

  1. First method

    • updating the R (> 4.2) and Bioconductor (3.16 version)
    • then install ggtree (>=3.6.1), the latest patch has been submitted to Bioconductor, and this version might be online tomorrow.
  2. Second method

    • install the ggplot2 (<=3.3.6 by remotes::install_version('ggplot2', version='3.3.6')) to keep the current R and Bioconductor.
  3. Third method

    • install the github (development) version by remotes::install_github('YuLab-SMU/ggtree') if you know what you are doing.
haideralrustem commented 1 year ago

Had same issue on Linux Centos and Debian OS. I had to install ggtree from github: install.packages("devtools") devtools::install_github("YuLab-SMU/ggtree")

hoondy commented 1 year ago

I can confirm the third method (dev version) with the latest ggplot2 (3.4.0) works fine. Thanks!

amizeranschi commented 1 year ago

Many thanks to everyone for your replies!

CVandiedonck commented 1 year ago

I successfully used the second method on my local home and also the third method on a server on which I couldn't upgrade R above R 4.1.0. Thank you so much ! You saved me for my teaching courses tomorrow !

zclecle2 commented 1 year ago

@xiangpin Thank you! I tried the first method and it works for me.

sn2298 commented 11 months ago

Error in get(x, envir = ns, inherits = FALSE) : object 'warning_wrap' not found Error: unable to load R code in package ‘ggtree’ Execution halted

im getting this error in installing chipseeker as well as in ggtree installation. im not understanding how to rectify this, above 2 solutions are not working from me. R version is 4.3.1