eddelbuettel / r2u

CRAN as Ubuntu Binaries

Home Page:https://eddelbuettel.github.io/r2u

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Instructions about installing bspm for r2u may be assuming a dependency that may be missing

cpsyctc opened this issue · comments

The instructions are:

apt install --yes --no-install-recommends python3-{dbus,gi,apt}
## Then install bspm (as root) and enable it, and enable a speed optimization
Rscript -e 'install.packages("bspm")'
RHOME=$(R RHOME)
echo "suppressMessages(bspm::enable())" >> ${RHOME}/etc/Rprofile.site
echo "options(bspm.version.check=FALSE)" >> ${RHOME}/etc/Rprofile.site

Failed on newly installed Ubuntu. I think because installing bspm may require make to have been installed as well as the python requirements.

When that install failed, the addition of those lines to Rprofile.site of course still went ahead changing Rprofile.site. That then caused confusing error messages when you next run R as execution of those lines expects that bpsm has been installed when it failed to install.

As I say, I think the cause of the failed installation of bspm was another missing dependency and for me, installing make solved that and then I could remove those messages from Rprofile.site, launch R, install bspm, reinstate those lines in Rprofile.site and everything is fine now. Maybe my diagnosis is incorrect but the facts of the matter were as reported.

Thanks for the note. These things are hard to describe and setup.

Can you show the error message(s)?

As you may know, there are also sibling scripts in https://github.com/eddelbuettel/r2u/blob/master/inst/scripts/ for focal and jammy you could just run. Last time I had to update things I ran the scripts successfully on both flavors and tried to make sure the written docs are aligned. I may have missed something -- QA is much appreciated.

I cannot as that was a new install using the "minimal" option. The failed install seemed to be sorted by apt-get install make and after that install.packages("bspm") completed but only after I had commented out the lines added to Rprofile.site (as otherwise they cause an error message as they presume that bspm had been successfully installed.

The error doesn't repeat as, I assume, the dependency is now fixed. I'm reluctant to purge make from the machine to test it, but it's my failback machine which I don't have to hand for the next two weeks.

This doesn't answer that but would it be safe to make the insertions to Rprofile.site conditional on the success of Rscript -e 'install.packages("bspm")'

I am not clever enough about console scripts but I guess in R it would be:

if (system.file(package="bspm" != "") {
   system(echo "suppressMessages(bspm::enable())" >> ${RHOME}/etc/Rprofile.site)
   system(echo "options(bspm.version.check=FALSE)" >> ${RHOME}/etc/Rprofile.site)
}

(untested).

Oh I see. Yes, fresh metal does not come around that often. The documentation is tested and validated against fresh (and as minimal as they are) Ubuntu containers under Docker (and they are small at 80mb or so, roughly 1/10 the size of r2u once built).

It is still Unix. Which is very user friendly. And also very selective in whom it picks as friends (paraphrasing an old but excellent pub).

So I may have to close this as 'not operational' and we have to wait for someone else to catch the error so that we can expand this in the documentation. I appreciate you took the initiative in trying to help.