rr-bigmemory

Installation of package ‘bigmemory’ had non-zero


I have installed bigmemory version 4.4.14. Now I am trying to upgrade it to bigmemory version 4.6.1 and got following error msg:

/usr/bin/ld: cannot find -luuid collect2: error: ld returned 1 exit status make: *** [/usr/share/R/share/make/shlib.mk:10: bigmemory.so] Error 1 ERROR: compilation failed for package ‘bigmemory’

  • removing ‘/home/super/R/x86_64-pc-linux-gnu-library/4.2/bigmemory’
  • restoring previous ‘/home/super/R/x86_64-pc-linux-gnu-library/4.2/bigmemory’ Warning in install.packages : installation of package ‘bigmemory’ had non-zero exit status

I have tried to upgrade via:

 Rstudio (Tools -> check for package update).

 install.packages("bigmemory")

 devtools::install_github("kaneplusplus/bigmemory")

Updated and upgraded ubntu and R packages:

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install r-base-dev

sudo apt install r-cran-bigmemory

update.packages(ask = FALSE)

install.packages("~/R/x86_64-pc-linux-gnu-library/4.2/bigmemory_4.6.1.tar.gz", repos = NULL, type = "source")

sessionInfo() R version 4.2.0 (2022-04-22) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.4 LTS

Matrix products: default BLAS:
/usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale: [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
LC_TIME=en_US.UTF-8 LC_COLLATE=en_GB.UTF-8
LC_MONETARY=en_US.UTF-8 [6] LC_MESSAGES=en_GB.UTF-8
LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils
datasets methods base

loaded via a namespace (and not attached): [1] compiler_4.2.0 tools_4.2.0

I am struggling from few days but still getting the same problem, any help will be highly appreciated.


Solution

  • The relevant part of the error message is “cannot find -luuid”. Which means that you are missing the libuuid system dependency, which you will need to install separately before you can install the R package. Since you’re on Ubuntu, you can do this via

    sudo apt install uuid-dev
    

    In general, when faced with this kind of error messages, it usually helps to search the relevant part of the error message online, which will lead to instructions on how to install the missing system dependencies (their package name isn’t always obvious, as above).