dyn.load() не удается найти объекты/библиотеки/объекты.поэтому общий объект при запуске в конвейерах Azure

#r #devtools #azure-pipelines-yaml #check

#r #devtools #лазурный-трубопроводы-yaml #проверять

Вопрос:

Редактировать:

Из сообщения об ошибке я боюсь, что общий объект не найден из-за того, что i) «блоки» не установлены (не были опробованы) или ii) блоки установлены по другому пути.

Я пытался как установить, так и изменить путь к библиотеке, но безуспешно

Я использую следующий файл YAML для запуска проверки R CMD в трубопроводах Azure:

 trigger: - master  pool:  vmImage: 'ubuntu-latest'  container:  image: 'rocker/tidyverse:latest'  variables:  _R_CHECK_FORCE_SUGGESTS_: false  MAKEFLAGS: "-j 2"  steps: - bash: R -q -e 'writeLines(".libPaths("~/R-private")", ".Rprofile"); dir.create("~/R-private", recursive = TRUE); print(Sys.getenv());'  displayName: "Preliminaries"  - bash: R -q -e 'install.packages(c("covr", "roxygen2", "testthat", "remotes", "rcmdcheck")); remotes::install_deps(dependencies = TRUE);'  displayName: 'Install Dependencies'  - bash: R -q -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check')"  displayName: 'Check Package'  - bash: R -q -e 'cov lt;- covr::package_coverage(); covr::to_cobertura(cov, "coverage.xml")'  displayName: 'Run Code Coverage'  condition: succeededOrFailed()  - task: UseDotNet@2  displayName: 'Use .NET Core sdk'  inputs:  packageType: sdk  version: 2.2.203  installationPath: $(Agent.ToolsDirectory)/dotnet  condition: succeededOrFailed()  - task: PublishCodeCoverageResults@1  displayName: 'Publish Code Coverage'  inputs:  codeCoverageTool: 'Cobertura'  summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'  condition: succeededOrFailed()  - task: PublishTestResults@2  displayName: 'Publish Test Results'  inputs:  testResultsFormat: 'JUnit'  testResultsFiles: '**/test-*.xml'  condition: succeededOrFailed()  - task: PublishBuildArtifacts@1  displayName: 'Publish Check log'  inputs:  pathToPublish: 'check/mypackage.Rcheck/00check.log'   artifactName: check   condition: succeededOrFailed()   

При запуске конвейера я получаю следующую ошибку:

 * installing *source* package ‘da’ ... ** using staged installation ** R ** data *** moving datasets to lazyload DB ** inst ** byte-compile and prepare package for lazy loading Error in dyn.load(file, DLLpath = DLLpath, ...) :   unable to load shared object '/home/vsts_azpcontainer/R-private/units/libs/units.so':  libudunits2.so.0: cannot open shared object file: No such file or directory Calls: lt;Anonymousgt; ... asNamespace -gt; loadNamespace -gt; library.dynam -gt; dyn.load Execution halted ERROR: lazy loading failed for package ‘da’ * removing ‘/__w/1/s/check/da.Rcheck/da’   

Печать полной ошибки:

   ── R CMD check ───────────────────────────────────────────────────────────────── * using log directory ‘/__w/1/s/check/da.Rcheck’ * using R version 4.1.2 (2021-11-01) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-manual’ * checking for file ‘da/DESCRIPTION’ ... OK * this is package ‘da’ version ‘0.0.0.9000’ * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘da’ can be installed ... ERROR Installation failed. See ‘/__w/1/s/check/da.Rcheck/00install.out’ for details. * DONE  Status: 1 ERROR See  ‘/__w/1/s/check/da.Rcheck/00check.log’ for details.  ── R CMD check results ────────────────────────────────────── da 0.0.0.9000 ──── Duration: 4.3s  ❯ checking whether package ‘da’ can be installed ... ERROR  See below...  ── Install failure ─────────────────────────────────────────────────────────────  * installing *source* package ‘da’ ... ** using staged installation ** R ** data *** moving datasets to lazyload DB ** inst ** byte-compile and prepare package for lazy loading Error in dyn.load(file, DLLpath = DLLpath, ...) :   unable to load shared object '/home/vsts_azpcontainer/R-private/units/libs/units.so':  libudunits2.so.0: cannot open shared object file: No such file or directory Calls: lt;Anonymousgt; ... asNamespace -gt; loadNamespace -gt; library.dynam -gt; dyn.load Execution halted ERROR: lazy loading failed for package ‘da’ * removing ‘/__w/1/s/check/da.Rcheck/da’  1 error ✖ | 0 warnings ✔ | 0 notes ✔ Error: R CMD check found ERRORs Execution halted ##[error]Bash exited with code '1'. Finishing: Check Package