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

Error on master during creating R-package artifact #4810

Closed
StrikerRUS opened this issue Nov 18, 2021 · 3 comments · Fixed by #4811
Closed

Error on master during creating R-package artifact #4810

StrikerRUS opened this issue Nov 18, 2021 · 3 comments · Fixed by #4811

Comments

@StrikerRUS
Copy link
Collaborator

StrikerRUS commented Nov 18, 2021

The error is

/usr/bin/bash --noprofile --norc /__w/_temp/a33835bd-d281-4493-92c1-a75b47d5fc5a.sh
Installing packages into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning in install.packages(c("R6", "data.table", "jsonlite", "knitr", "Matrix",  :
  'lib = "/usr/local/lib/R/site-library"' is not writable
Error in install.packages(c("R6", "data.table", "jsonlite", "knitr", "Matrix",  : 
  unable to install packages
Execution halted
##[error]Bash exited with code '255'.

https://dev.azure.com/lightgbm-ci/lightgbm-ci/_build/results?buildId=11589&view=logs&j=5da18647-a2c4-530c-67bd-d83884ef8652&t=35f4e228-47be-5b41-fe2b-23aac79c123c

We are not creating R-package artifact for PRs, that's why #4775 passed all CI checks.

condition: not(startsWith(variables['Build.SourceBranch'], 'refs/pull/'))

We need to comment that line during testing a fix and then uncomment it back.

I guess we just should either set env variable for a writable directory

R_LIB_PATH=~/Rlib
mkdir -p $R_LIB_PATH
export R_LIBS=$R_LIB_PATH

or specify it as lib argument
Rscript --vanilla -e "options(install.packages.compile.from.source = '${compile_from_source}'); install.packages(${packages}, repos = '${CRAN_MIRROR}', lib = '${R_LIB_PATH}', dependencies = c('Depends', 'Imports', 'LinkingTo'), Ncpus = parallel::detectCores())" || exit -1

cc @jameslamb

@jameslamb
Copy link
Collaborator

Ah! Thanks for writing this up. I can test in a few hours.

@StrikerRUS
Copy link
Collaborator Author

Thank you! Feel free to use my branch: https://github.com/microsoft/LightGBM/tree/fix_r_artifact.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot removed the blocking label Aug 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants