I'm trying to use the Salesforcer package in a Bitbucket Pipeline.
However, on installation of Salesforcer I get the following error message:
* installing *source* package ‘salesforcer’ ...
** package ‘salesforcer’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error: .onLoad failed in loadNamespace() for 'XML', details:
call: dyn.load(file, DLLpath = DLLpath, ...)
error: unable to load shared object '/usr/local/lib/R/site-library/XML/libs/XML.so':
libxml2.so.2: cannot open shared object file: No such file or directory
Execution halted
ERROR: lazy loading failed for package ‘salesforcer’
* removing ‘/usr/local/lib/R/site-library/salesforcer’
The downloaded source packages are in
‘/tmp/RtmppCefXI/downloaded_packages’
Warning message:
In install.packages("salesforcer") :
installation of package ‘salesforcer’ had non-zero exit status
My bitbucket-pipelines.yml
file is as follows:
image: rocker/r-ver:4.2.1
pipelines:
custom:
script4-pipeline-3: # The name displayed in the Bitbucket Cloud GUI
- step:
script:
- apt-get update && apt-get install -y unzip git git-core libc-client-dev libkrb5-dev && rm -r /var/lib/apt/lists/*
- Rscript -e "install.packages('salesforcer')"
- Rscript "script4.R"
- git add "script4.csv"
- git commit -m "[Pipeline] Add foo CSV file."
- git push
Trying to troubleshoot this, I tried the command apt-get install libxml2
but got:
+ apt-get install libxml2
Reading package lists...
Building dependency tree...
Reading state information...
Package libxml2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libxml2' has no installation candidate
Would anyone have any tips on how to proceed / resolve this issue??