Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
amizeranschi opened this issue Nov 7, 2022 · 8 comments
Closed

Comments

@amizeranschi
Copy link

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
Copy link

hoondy commented Nov 7, 2022

I am getting the same error about warning_wrap

@xiangpin
Copy link
Member

xiangpin commented Nov 8, 2022

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.
  1. Second method
  • install the ggplot2 (<=3.3.6 by remotes::install_version('ggplot2', version='3.3.6')) to keep the current R and Bioconductor.
  1. Third method
  • install the github (development) version by remotes::install_github('YuLab-SMU/ggtree') if you know what you are doing.

@haideralrustem
Copy link

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
Copy link

hoondy commented Nov 8, 2022

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

@amizeranschi
Copy link
Author

Many thanks to everyone for your replies!

CVandiedonck added a commit to CVandiedonck/megm1_ue5_r that referenced this issue Nov 11, 2022
function "warning_wrap" required to install clusterProfiler dependecies (ggtree in particular))
but version of ggplot2 installed v3.4.0 has an issue for "warning_wrap": YuLab-SMU/ggtree#548 
Since the installation of version of R 4.2 was impossible in the yml, I follow the second method suggested here:  YuLab-SMU/ggtree#544
CVandiedonck added a commit to CVandiedonck/geno_bioinfo_r that referenced this issue Nov 11, 2022
function "warning_wrap" required to install clusterProfiler dependecies (ggtree in particular))
but version of ggplot2 installed v3.4.0 has an issue for "warning_wrap": YuLab-SMU/ggtree#548 
Since the installation of version of R 4.2 was impossible in the yml, I follow the second method suggested here:  YuLab-SMU/ggtree#544
CVandiedonck added a commit to CVandiedonck/geno_bioinfo_r that referenced this issue Nov 12, 2022
@CVandiedonck
Copy link

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
Copy link

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

@sn2298
Copy link

sn2298 commented Sep 19, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants