LidR package installation

Dear All,

I'm currently experiencing an issue with the installation of the package lidR in the R studio cloud project.

Here is the warning error I visualized:

ERROR: dependency ‘BH’ is not available for package ‘lidR’

  • removing ‘/cloud/lib/x86_64-pc-linux-gnu-library/4.4/lidR’

Can Anyone suggest a solution?

Thanks in advances

Luigi :slight_smile:
-->

Hello Luigi!

So the installation of the BH package failed? What is the full output of this?

install.packages("BH")

Hi Gabor,

I tried installing the "BH" package, but it also failed!

Here the error message I visualized:

Error in download.file(url, destfile, method, mode = "wb", ...) :
download from 'http://rspm/default/__linux__/focal/latest/src/contrib/BH_1.84.0-0.tar.gz' failed

Probably, there is a specific problem with the download of the package

Luigi :slight_smile:

Can you please show us the full output? E.g. for me it looks like this:

> install.packages("BH")
Installing package into ‘/root/R/x86_64-pc-linux-gnu-library/4.4’
(as ‘lib’ is unspecified)
trying URL 'https://packagemanager.posit.co/cran/__linux__/jammy/latest/src/contrib/BH_1.84.0-0.tar.gz'
Content type 'binary/octet-stream' length 13030146 bytes (12.4 MB)
==================================================
downloaded 12.4 MB

* installing *binary* package ‘BH’ ...
* DONE (BH)

The downloaded source packages are in
	‘/tmp/Rtmp38EthJ/downloaded_packages’
>
1 Like

here the full output:

install.packages('BH')
Installing package into ‘/cloud/lib/x86_64-pc-linux-gnu-library/4.4’
(as ‘lib’ is unspecified)
trying URL 'http://rspm/default/__linux__/focal/latest/src/contrib/BH_1.84.0-0.tar.gz'
Content type 'application/x-gzip' length 13031771 bytes (12.4 MB)
=================================================
downloaded 12.4 MB

Warning in install.packages :
  downloaded length 13031424 != reported length 13031771
Warning in install.packages :
  URL 'http://rspm/default/__linux__/focal/latest/src/contrib/BH_1.84.0-0.tar.gz': status was 'Transferred a partial file'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
  download from 'http://rspm/default/__linux__/focal/latest/src/contrib/BH_1.84.0-0.tar.gz' failed
Warning in install.packages :
  download of package ‘BH’ failed

We'll need to investigate what this could be, but nevertheless you can try the installation with pak. First install pak:

install.packages("pak", repos = sprintf(
  "https://r-lib.github.io/p/pak/stable/%s/%s/%s",
  .Platform$pkgType,
  R.Version()$os,
  R.Version()$arch
))

(Cf. All about installing pak. — Installing pak • pak)
and then install BH with:

pak::pkg_install("BH")
1 Like

We can actually reproduce this, and it is definitely something on the server side, as it happens with pak as well.

However, it only happens with R 4.4.x, so a workaround is to use R 4.3.x, until this is fixed.

2 Likes

We've identified the issue and resolved it. BH should install fine again for R 4.4 on Cloud. @Luigi_Saulino can you try it again now?

1 Like

Dear Greg and Gabor,

Many thanks for your effort! Now it works!
I installed both 'BH' and 'lidR' packages by using version R 4.4.1

Best,

Luigi

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.