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

installation failed: had non-zero exit status #49

Open
XiaoyuZeng opened this issue Aug 15, 2021 · 11 comments
Open

installation failed: had non-zero exit status #49

XiaoyuZeng opened this issue Aug 15, 2021 · 11 comments

Comments

@XiaoyuZeng
Copy link

Hi All.

I recently failed to install rave, especially future.apply package. I reinstalled R 4.1.1 and the latest Rstudio, but it did not help.

I also reported this bug on Github issus of future.apply (https://github.com/HenrikBengtsson/future.apply/issues/91). Any ideas?

Session information

R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936 LC_CTYPE=Chinese (Simplified)_China.936
[3] LC_MONETARY=Chinese (Simplified)_China.936 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.936

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] Rcpp_1.0.7 pillar_1.6.2 compiler_4.1.1 prettyunits_1.1.1 remotes_2.4.0 tools_4.1.1
[7] testthat_3.0.4 pkgload_1.2.1 pkgbuild_1.2.0 memoise_2.0.0 lubridate_1.7.10 lifecycle_1.0.0
[13] tibble_3.1.3 gtable_0.3.0 pkgconfig_2.0.3 rlang_0.4.11 rstudioapi_0.13 DBI_1.1.1
[19] cli_3.0.1 curl_4.3.2 fastmap_1.1.0 withr_2.4.2 dplyr_1.0.7 desc_1.3.0
[25] fs_1.5.0 devtools_2.4.2 generics_0.1.0 vctrs_0.3.8 rprojroot_2.0.2 grid_4.1.1
[31] tidyselect_1.1.1 glue_1.4.2 R6_2.5.0 processx_3.5.2 fansi_0.5.0 sessioninfo_1.1.1
[37] ggplot2_3.3.5 purrr_0.3.4 callr_3.7.0 magrittr_2.0.1 usethis_2.0.1 scales_1.1.1
[43] ps_1.6.0 ellipsis_0.3.2 assertthat_0.2.1 colorspace_2.0-2 utf8_1.2.2 munsell_0.5.0
[49] cachem_1.0.5 crayon_1.4.1

@beauchamplab
Copy link
Owner

@XiaoyuZeng Thanks for reporting this issue.

We are trying to reproduce the error you have mentioned. We would be very thankful if you could attach the error message here. It would be also more helpful if we could know how you encountered this error (like which code/steps you have run).

Thanks!

@XiaoyuZeng
Copy link
Author

@XiaoyuZeng Thanks for reporting this issue.

We are trying to reproduce the error you have mentioned. We would be very thankful if you could attach the error message here. It would be also more helpful if we could know how you encountered this error (like which code/steps you have run).

Thanks!

Thanks for the quick reply!

code to install rave:
remotes::install_github('beauchamplab/rave') remotes::install_github('beauchamplab/ravebuiltins@migrate2')

warnings:

Warning messages:
1: In i.p(...) :
installation of package ‘future.apply’ had non-zero exit status
2: In i.p(...) :
installation of package ‘C:/Users/xiaoy/AppData/Local/Temp/RtmpKYctCw/file5eb01a9ad8/rave_1.0.2.1.tar.gz’ had non-zero exit status

Warning messages:
1: In i.p(...) :
installation of package ‘future.apply’ had non-zero exit status
2: In i.p(...) :
installation of package ‘C:/Users/xiaoy/AppData/Local/Temp/RtmpKYctCw/file5eb0643944b7/rutabaga_0.1.7.tar.gz’ had non-zero exit status
3: In i.p(...) :
installation of package ‘future.apply’ had non-zero exit status
4: In i.p(...) :
installation of package ‘C:/Users/xiaoy/AppData/Local/Temp/RtmpKYctCw/file5eb01eb772f5/rave_1.0.2.1.tar.gz’ had non-zero exit status
5: In i.p(...) :
installation of package ‘future.apply’ had non-zero exit status
6: In i.p(...) :
installation of package ‘C:/Users/xiaoy/AppData/Local/Temp/RtmpKYctCw/file5eb03862121/ravebuiltins_0.1.1.tar.gz’ had non-zero exit status

I've tried:

  1. deleted the rave-related package (e.g., raveio) and reinstalled. did not work
  2. uninstall the Rbase and Rsudio (both are latest) and reinstalled rave, did not work.

This installation failure might largely be due to the future.apply package, which is why I also reported in the Github issue there. But I also wanted to know whether other rave users ever encountered this error. Any other ideas?

@beauchamplab
Copy link
Owner

Hi @XiaoyuZeng , I read the issue you posted on future.apply repository. I found myself unable to reproduce the issue neither. I suspect there could be some left-overs in your R library path that blocks the new installations. Would you mind checking the followings for me?

In your R, enter .libPaths() and return. This function call will display the paths where the libraries could be installed. Please go to each library path to see whether it contains folders starting with 00, such as 00future.apply.lock (something similar). If so, please remove all of them and re-install future.apply.

Also please check your home directory to see if there is any .Rprofile file or folder. If so, please re-name it to .Rprofile.bak or give it other names. This will avoid some startup scripts.

I hope these help : )

@XiaoyuZeng
Copy link
Author

Hi @XiaoyuZeng , I read the issue you posted on future.apply repository. I found myself unable to reproduce the issue neither. I suspect there could be some left-overs in your R library path that blocks the new installations. Would you mind checking the followings for me?

In your R, enter .libPaths() and return. This function call will display the paths where the libraries could be installed. Please go to each library path to see whether it contains folders starting with 00, such as 00future.apply.lock (something similar). If so, please remove all of them and re-install future.apply.

Also please check your home directory to see if there is any .Rprofile file or folder. If so, please re-name it to .Rprofile.bak or give it other names. This will avoid some startup scripts.

I hope these help : )

Thanks for your advice! highly appreciate your help.

However, I tried a) check R library; b) check .Rprofile and two methods did not work. a) I did not find any 00filefolder; b) I did not find .Rprofile in home directory.

I wondered whether its due the mirror I used in China. I'll just wait some time to see whether I can install the future.apply and also rave in near future.

Again, thanks for your help.

@XiaoyuZeng
Copy link
Author

XiaoyuZeng commented Aug 19, 2021

Hi @XiaoyuZeng , I read the issue you posted on future.apply repository. I found myself unable to reproduce the issue neither. I suspect there could be some left-overs in your R library path that blocks the new installations. Would you mind checking the followings for me?

In your R, enter .libPaths() and return. This function call will display the paths where the libraries could be installed. Please go to each library path to see whether it contains folders starting with 00, such as 00future.apply.lock (something similar). If so, please remove all of them and re-install future.apply.

Also please check your home directory to see if there is any .Rprofile file or folder. If so, please re-name it to .Rprofile.bak or give it other names. This will avoid some startup scripts.

I hope these help : )

Hi.

I successfully installed future.apply by uninstalling the latest r 4.1.1 and then installing r 4.1.0 instead. I think this issue might be due to the R version and future.apply version.

Anyway, thanks for your help!

@XiaoyuZeng
Copy link
Author

XiaoyuZeng commented Aug 19, 2021

@beauchamplab
Hi again. I still could not install rave completely. Have no idea how I can solve this problem. Thus I may switch to use rave-docker instead. If you have any new ideas related to this issue, please do inform me!

Here comes the bug report. 'had non-zero exit status' for rave this time.

The downloaded binary packages are in

C:\Users\xiaoy\AppData\Local\Temp\Rtmp4Y2GjF\downloaded_packages
√ checking for file 'C:\Users\xiaoy\AppData\Local\Temp\Rtmp4Y2GjF\remotes389c57aa1c04\beauchamplab-rave-00fe7ca/DESCRIPTION' ...

  • preparing 'rave':
    √ checking DESCRIPTION meta-information ...
  • checking for LF line-endings in source and make files and shell scripts (347ms)
  • checking for empty or unneeded directories

Removed empty directory 'rave/api'
Removed empty directory 'rave/docker'
Removed empty directory 'rave/inst/markdowns'

  • building 'rave_1.0.2.1.tar.gz'

Warning message:
In i.p(...) :
installation of package ‘C:/Users/xiaoy/AppData/Local/Temp/Rtmp4Y2GjF/file389c19cf59e9/rave_1.0.2.1.tar.gz’ had non-zero exit status

@XiaoyuZeng
Copy link
Author

XiaoyuZeng commented Aug 19, 2021

another try: I followed the procedure in the enclosed link to completely uninstall rbase and rstudio and reinstall them. still did not work...

In i.p(...) :
installation of package ‘C:/Users/xiaoy/AppData/Local/Temp/RtmpUlC4Qi/file3f68369a41d2/rave_1.0.2.1.tar.gz’ had non-zero exit status

https://stackoverflow.com/questions/55204017/how-to-uninstall-r-and-rstudio-with-all-packages-settings-and-everything-else

@XiaoyuZeng
Copy link
Author

full output:

remotes::install_github('beauchamplab/rave')
Downloading GitHub repo beauchamplab/rave@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All
2: CRAN packages only
3: None
4: later (1.2.0 -> 1.3.0) [CRAN]
5: httpuv (1.6.1 -> 1.6.2) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 2
later (1.2.0 -> 1.3.0) [CRAN]
httpuv (1.6.1 -> 1.6.2) [CRAN]
Installing 2 packages: later, httpuv

There is a binary version, but the source code version is later:
binary source needs_compilation
later 1.2.0 1.3.0 TRUE
httpuv 1.6.1 1.6.2 TRUE

Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/later_1.2.0.zip'
Content type 'application/zip' length 860045 bytes (839 KB)
downloaded 839 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/httpuv_1.6.1.zip'
Content type 'application/zip' length 1639861 bytes (1.6 MB)
downloaded 1.6 MB

package ‘later’ successfully unpacked and MD5 sums checked
package ‘httpuv’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\xiaoy\AppData\Local\Temp\RtmpuKdyti\downloaded_packages
√ checking for file 'C:\Users\xiaoy\AppData\Local\Temp\RtmpuKdyti\remotes1f48731b38b5\beauchamplab-rave-00fe7ca/DESCRIPTION' ...

  • preparing 'rave':
    √ checking DESCRIPTION meta-information ...
  • checking for LF line-endings in source and make files and shell scripts (390ms)
  • checking for empty or unneeded directories
    Removed empty directory 'rave/api'
    Removed empty directory 'rave/docker'
    Removed empty directory 'rave/inst/markdowns'
  • building 'rave_1.0.2.1.tar.gz'

Warning message:
In i.p(...) :
installation of package ‘C:/Users/xiaoy/AppData/Local/Temp/RtmpuKdyti/file1f485d054fae/rave_1.0.2.1.tar.gz’ had non-zero exit status

session info:

sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936 LC_CTYPE=Chinese (Simplified)_China.936
[3] LC_MONETARY=Chinese (Simplified)_China.936 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.936

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] rstudioapi_0.13 magrittr_2.0.1 usethis_2.0.1 devtools_2.4.2 pkgload_1.2.1 R6_2.5.0
[7] rlang_0.4.11 fastmap_1.1.0 tools_4.1.1 pkgbuild_1.2.0 sessioninfo_1.1.1 cli_3.0.1
[13] withr_2.4.2 ellipsis_0.3.2 remotes_2.4.0 rprojroot_2.0.2 lifecycle_1.0.0 crayon_1.4.1
[19] processx_3.5.2 purrr_0.3.4 callr_3.7.0 fs_1.5.0 ps_1.6.0 testthat_3.0.4
[25] memoise_2.0.0 glue_1.4.2 cachem_1.0.5 compiler_4.1.1 desc_1.3.0 prettyunits_1.1.1

@beauchamplab
Copy link
Owner

Hi @XiaoyuZeng , from your most recent update, future.apply seems to have been installed successfully. Is that the case?

We tried to replicate your issue on a fresh new environment, but I suspect some previous configuration files are corrupted.

Would you mind trying

library(raveio)

to see if error occurred. If so, please run

remotes::install_github("beauchamplab/raveio")

and then remotes::install_github("beauchamplab/rave")

Thanks

@XiaoyuZeng
Copy link
Author

@beauchamplab
thanks for this suggestion, I indeed got some informative warnings.

First, I found I actually failed to install rhdf5. Then I installed rhdf5 through biomanager.

Then I tried twice to install raveio.

first warning:

remotes::install_github("beauchamplab/raveio")
Downloading GitHub repo beauchamplab/raveio@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All
2: CRAN packages only
3: None
4: cachem (1.0.5 -> 1.0.6) [CRAN]
5: later (1.2.0 -> 1.3.0) [CRAN]
6: httpuv (1.6.1 -> 1.6.2) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 2
cachem (1.0.5 -> 1.0.6) [CRAN]
later (1.2.0 -> 1.3.0) [CRAN]
R6 (NA -> 2.5.1) [CRAN]
httpuv (1.6.1 -> 1.6.2) [CRAN]
Installing 4 packages: cachem, later, R6, httpuv

有二进制版本的,但源代码版本是后来的:
binary source needs_compilation
cachem 1.0.5 1.0.6 TRUE
later 1.2.0 1.3.0 TRUE
R6 2.5.0 2.5.1 FALSE
httpuv 1.6.1 1.6.2 TRUE

Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/cachem_1.0.5.zip'
Content type 'application/zip' length 78377 bytes (76 KB)
downloaded 76 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/later_1.2.0.zip'
Content type 'application/zip' length 860045 bytes (839 KB)
downloaded 839 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/httpuv_1.6.1.zip'
Content type 'application/zip' length 1639861 bytes (1.6 MB)
downloaded 1.6 MB

package ‘cachem’ successfully unpacked and MD5 sums checked
package ‘later’ successfully unpacked and MD5 sums checked
package ‘httpuv’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
C:\Users\xiaoy\AppData\Local\Temp\RtmpWOfUZs\downloaded_packages
安装源码包‘R6’

trying URL 'https://cran.rstudio.com/src/contrib/R6_2.5.1.tar.gz'
Content type 'application/x-gzip' length 63422 bytes (61 KB)
downloaded 61 KB

The downloaded source packages are in
‘C:\Users\xiaoy\AppData\Local\Temp\RtmpWOfUZs\downloaded_packages’
Running R CMD build...

STDOUT:

STDERR:

Error: Failed to install 'raveio' from GitHub:
Failed to R CMD build package, try build = FALSE.
In addition: Warning messages:
1: In i.p(...) : installation of package ‘R6’ had non-zero exit status
2: In system2(real_cmd, args, stderr = stderrfile, stdout = stdoutfile) :
'CreateProcess' failed to run 'd:\Program Files\R\R-4.1.1\bin\x64\Rcmd.exe build --no-resave-data --no-manual --no-build-vignettes "C:\Users\xiaoy\AppData\Local\Temp\RtmpWOfUZs\remotes3ab435501ee2\beauchamplab-raveio-b2c8f2a"'

Then I successfully installed R6 through https://cran.r-project.org/web/packages/R6/index.html.

second warning:

install.packages("D:/Download/zip/R6_2.5.0.zip", repos = NULL, type = "win.binary")
package ‘R6’ successfully unpacked and MD5 sums checked
remotes::install_github("beauchamplab/raveio")
Downloading GitHub repo beauchamplab/raveio@HEAD
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All
2: CRAN packages only
3: None
4: cachem (1.0.5 -> 1.0.6) [CRAN]
5: later (1.2.0 -> 1.3.0) [CRAN]
6: R6 (2.5.0 -> 2.5.1) [CRAN]
7: httpuv (1.6.1 -> 1.6.2) [CRAN]

Enter one or more numbers, or an empty line to skip updates: 3
√ checking for file 'C:\Users\xiaoy\AppData\Local\Temp\RtmpWOfUZs\remotes3ab437fa5a94\beauchamplab-raveio-b2c8f2a/DESCRIPTION' ...

  • preparing 'raveio':
    √ checking DESCRIPTION meta-information ...
  • installing the package to process help pages
    Warning in system2(command, args, stdout = outfile, stderr = outfile) :
    'CreateProcess'调用'd:\Program Files\R\R-4.1.1\bin\x64\Rcmd.exe INSTALL -l "C:\Users\xiaoy\AppData\Local\Temp\RtmpET2TTY\Rinst1e042e772ea4" --no-multiarch "C:/Users/xiaoy/AppData/Local/Temp/RtmpET2TTY/Rbuild1e0411786ce8/raveio"'失败
    -----------------------------------
    -----------------------------------
    ERROR: package installation failed
    Error: Failed to install 'raveio' from GitHub:
    System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr:
    E> * checking for file 'C:\Users\xiaoy\AppData\Local\Temp\RtmpWOfUZs\remotes3ab437fa5a94\beauchamplab-raveio-b2c8f2a/DESCRIPTION' ... OK
    E> * preparing 'raveio':
    E> * checking DESCRIPTION meta-information ... OK
    E> * installing the package to process help pages
    E> Warning in system2(command, args, stdout = outfile, stderr = outfile) :
    E> 'CreateProcess'调用'd:\Program Files\R\R-4.1.1\bin\x64\Rcmd.exe INSTALL -l "C:\Users\xiaoy\AppData\Local\Temp\RtmpET2TTY\Rinst1e042e772ea4" --no-multiarch "C:/Users/xiaoy/AppData/Local/Temp/RtmpET2TTY/Rbuild1e0411786ce8/raveio"'失败
    E> -----------------------------------
    E> -----------------------------------
    E> ERROR: package installation failed

any clue?

@beauchamplab
Copy link
Owner

beauchamplab commented Aug 24, 2021

It looks like you cannot build packages from source. I have never encountered this issue before. Maybe R-core or CRAN folks can answer your question. They are helpful if you can shoot emails to r-help.

Also to answer your questions whether it's installing packages that has messed up your rtools, the answer is no because rtools should be "read-only" to packages and R packages don't have the right to change anything within rtools. However, I do think maybe your r-tools was not linked or installed successfully. Therefore we recommend you to re-install r-tools (remove C:\rtools40 and re-install. You don't have to re-install R nor RStudio) if your r-tools was installed before R.

Alternatively, since you can install from compiled, we've compiled the packages on our private repository. Maybe you could try the followings to install compiled packages without installing from the source. Please make sure do not upgrade nor install from source. Just install the binary or pre-compiled versions. You can avoid using rtools in this way.

options(repos = c(
    dipterix = 'https://dipterix.r-universe.dev',
    beauchamplab = 'https://beauchamplab.r-universe.dev',
    grimbough = 'https://grimbough.r-universe.dev',
    drat = 'https://dipterix.github.io/drat',
    CRAN = 'https://cloud.r-project.org'))

install.packages(c("raveio", "rave", "rhdf5"))

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

2 participants