On 6 June 2023 at 23:33, Johan Andresen wrote:
| Cheers - my response mixes up the order of things:
|
| The suggested apt way INSTALLED INTERFLEX nicely. Lesson learned: install
| dependencies from apt if a package/library isn't in apt search.
|
| Yes I also tried install.packages('interflex'). RStudio console
complained
| about the same packages like this:
| ERROR: dependency 'xyz' is not available for package
''abc"
| * removing '/home/............/4.3/abc'
| Warning in install.packages?:
| ?installation of package 'abc' had non-zero exit status.
That can happen when a compile-from-source fails for lack of a (for
compilation from source) needed -dev packages.
Which is why _reliable_ and _complete_ provision of binaries is such a game
changer. I have been at this for 20+ years (as it was that long ago that
injected the first few r-cran-* packages into Debian).
And having r2u is a complete gamechanger.
I can drop into a random code repository (as today for work), run my
`installDeps.r` helper to install everything, or in the demo for you just do
`install.r interflex` (or, if one prefers run it as an R command via eg a
simple `Rscript -e 'install.packages("interflex")'`).
And getting all of that in under 30 seconds _reliably_ is pure magic.
| ok, AFAIU, wanting to manage R?dependencies as easily as possible suggests
| using Ubuntu with r2u instead of Debian. Be my guest to evaluate this
| interpretation.
It would be sweet if we could do something like r2u for Debian, but for now
we can't. Switching between Debian and Ubuntu is not that onerous though.
Cheers, Dirk
| Johan
|
|
|
|
| Den tirs. 6. jun. 2023 kl. 19.58 skrev Dirk Eddelbuettel <edd at
debian.org>:
|
|
| On 6 June 2023 at 19:37, Johan Andresen wrote:
| | I'd like input on how to install interflex
| | <https://github.com/xuyiqing/interflex> (note the instructions on
its
| | github).
|
| It says? ?install.packages("interflex")? ?-- did you try that?
|
| | The installation failed on stable/bullseye, also when I updated to the
| | newer R version 4.3.0 through secure apt and the additional source.list
| | <https://cran.r-project.org/bin/linux/debian/#secure-apt> element.
| | 1. $ `sudo apt r-base-dev`
| | 2. RStudio install.packages('pacman')
| | 3. RStudio pacman::p_load('interflex')
|
| Sorry but that is non-standard and not what a) the R documentation
suggests
| or b) the package itself suggests.? You're on your own there; maybe
try the
| RStudio / posit help forums for pacman.?
|
| My preference these days is r2u (on Ubuntu 22.04) and a quick
|
| ? ?$ time docker run --rm -ti rocker/r2u:22.04 install.r interflex
|
| succeeded in 22 seconds (!!) installing a total of 91 (!!) different .deb
| packages. I like r2u a _lot_ for this ease, speed and reliability of fully
| dependency-declared .deb packages (for Ubuntu 22.04 and 20.04, NOT for
| Debian).? See? ?https://eddelbuettel.github.io/r2u/? ?for more.
|
| | Warning messages:
| |
| | > 1: In utils::install.packages(package, ...) :
| | >? installation of package 'nloptr' had non-zero exit status
| | > 2: In utils::install.packages(package, ...) :
| | >? installation of package 'lme4' had non-zero exit status
| | > 3: In utils::install.packages(package, ...) :
| | >? installation of package 'pbkrtest' had non-zero exit
status
| | > 4: In utils::install.packages(package, ...) :
| | >? installation of package 'car' had non-zero exit status
| | > 5: In utils::install.packages(package, ...) :
| |
| |? installation of package 'AER' had non-zero exit status
| | > 6: In utils::install.packages(package, ...) :
| | >? installation of package 'interflex' had non-zero exit
status
| | > 7: In p_install(package, character.only = TRUE, ...) :
| | > 8: In library(package, lib.loc = lib.loc, character.only = TRUE,
| | > logical.return = TRUE, :
| | >? there is no package called 'interflex'
| | > 9: In pacman::p_load("interflex") : Failed to
install/load:
| | >? interflex
|
| There is a saying that you try to walk before you run. _Many_ of those
| packages failing to install from source (== harder, you need dependencies,
| and also slower) are in fact available as r-cran-xyz package for
| Debian. Try 'apt-cache search r-cran-xyz' for different values of
xyz.
|
| Cheers, Dirk
|
| --
| dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
|
--
dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org