Issue installing presto
Closed this issue · 1 comments
I ran into the following issue installing presto on a windows machine:
> devtools::install_github("immunogenomics/presto")
Downloading GitHub repo immunogenomics/presto@HEAD
── R CMD build ───────────────────────────────────────────────────────────────────────────────────────
✔ checking for file 'directory\AppData\Local\Temp\RtmpIjsxxG\remotes7d057eb7ad5\immunogenomics-presto-7636b3d/DESCRIPTION' ...
─ preparing 'presto': (385ms)
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building 'presto_1.0.0.tar.gz'
Installing package into ‘directory/AppData/Local/R/win-library/4.4’
(as ‘lib’ is unspecified)
* installing *source* package 'presto' ...
** using staged installation
** libs
Error in if (nzchar(cxx)) { : argument is of length zero
* removing 'directory4/AppData/Local/R/win-library/4.4/presto'
Warning message:
In i.p(...) :
installation of package ‘directory/AppData/Local/Temp/RtmpIjsxxG/file7d0699435d6/presto_1.0.0.tar.gz’ had non-zero exit status
Here's the session info:
> sessionInfo()
R version 4.4.1 (2024-06-14 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22621)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8
time zone: America/New_York
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] miniUI_0.1.1.1 compiler_4.4.1 promises_1.3.0 Rcpp_1.0.12
[5] stringr_1.5.1 callr_3.7.6 later_1.3.2 fastmap_1.2.0
[9] mime_0.12 R6_2.5.1 curl_5.2.1 htmlwidgets_1.6.4
[13] desc_1.4.3 profvis_0.3.8 shiny_1.8.1.1 rlang_1.1.4
[17] cachem_1.1.0 stringi_1.8.4 httpuv_1.6.15 fs_1.6.4
[21] pkgload_1.3.4 memoise_2.0.1 cli_3.6.2 magrittr_2.0.3
[25] ps_1.7.6 processx_3.8.4 digest_0.6.35 rstudioapi_0.16.0
[29] xtable_1.8-4 remotes_2.5.0 devtools_2.4.5.9000 lifecycle_1.0.4
[33] vctrs_0.6.5 glue_1.7.0 urlchecker_1.0.1 sessioninfo_1.2.2
[37] pkgbuild_1.4.4 purrr_1.0.2 tools_4.4.1 usethis_2.2.3
[41] ellipsis_0.3.2 htmltools_0.5.8.1
Could you please kindly suggest a way to fix it? Thanks!
Search Google for Error in if (nzchar(cxx))
There, you will find that many people have encountered the same issue.
Did you omit any lines from this part of the output?
** libs
Error in if (nzchar(cxx)) { : argument is of length zero
It would be helpful if we can see more information about where this error originates.
After browsing Google results, my understanding is that this issue is independent of the presto package. Instead, the root cause is the R installation and configuration. The presto package should install successfully on Windows, because our GitHub Actions successfully runs on Windows.
If you are using conda to install R, consider uninstalling this version of R. Instead, try to install R from https://www.r-project.org/ and avoid using alternative methods like conda. Or, if you prefer to continue using conda for R, consider cleaning your conda environment with conda clean -a
.
If you find a solution to your problem, please share it here so others may benefit in the future.