Problem installing tidyverse: with a Warning in install.packages:installation of package ‘tidyverse’ had non-zero exit status

/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
collect2: error: ld returned 1 exit status
/usr/share/R/share/make/shlib.mk:10: recipe for target 'Matrix.so' failed
make: *** [Matrix.so] Error 1
ERROR: compilation failed for package ‘Matrix’
* removing ‘/home/ephrem/R/i686-pc-linux-gnu-library/4.1/Matrix’
Warning in install.packages : installation of package ‘Matrix’ had non-zero exit status
ERROR: dependency ‘Matrix’ is not available for package ‘mgcv’
* removing ‘/home/ephrem/R/i686-pc-linux-gnu-library/4.1/mgcv’
Warning in install.packages : installation of package ‘mgcv’ had non-zero exit status
ERROR: dependency ‘mgcv’ is not available for package ‘ggplot2’
* removing ‘/home/ephrem/R/i686-pc-linux-gnu-library/4.1/ggplot2’
Warning in install.packages : installation of package ‘ggplot2’ had non-zero exit status
ERROR: dependency ‘ggplot2’ is not available for package ‘tidyverse’
* removing ‘/home/ephrem/R/i686-pc-linux-gnu-library/4.1/tidyverse’
Warning in install.packages : installation of package ‘tidyverse’ had non-zero exit status
The downloaded source packages are in ‘/tmp/Rtmp85JnYq/downloaded_packages’
Warning in install.packages : converting NULL pointer to R NULL

I’m working on Ubuntu 18 (if it helps) Architecture: i686 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian

> sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: i686-pc-linux-gnu (32-bit)
Running under: Ubuntu 18.04.6 LTS
Matrix products: default
BLAS: /usr/lib/i386-linux-gnu/atlas/libblas.so.3.10.3
LAPACK: /usr/lib/i386-linux-gnu/atlas/liblapack.so.3.10.3

Out put of apt-cache policy r-base-dev:

r-base-dev: Installed: (none) Candidate: 4.1.1-1.2004.0 Version table: 4.1.1-1.2004.0 500 500 focal-cran40/ Packages 4.1.1-1.1804.0 500 500 bionic-cran40/ Packages 4.1.0-1.2004.0 500 500 focal-cran40/ Packages 4.1.0-1.1804.0 500 500 bionic-cran40/ Packages 4.0.5-1.2004.0 500 500 focal-cran40/ Packages 4.0.5-1.1804.0 500 500 bionic-cran40/ Packages 4.0.4-1.2004.0 500 500 focal-cran40/ Packages 4.0.4-1.1804.0 500 500 bionic-cran40/ Packages 4.0.3-1.2004.0 500 500 focal-cran40/ Packages 4.0.3-1.1804.0 500 500 bionic-cran40/ Packages 4.0.2-1.2004.0 500 500 focal-cran40/ Packages 4.0.2-1.1804.0 500 500 bionic-cran40/ Packages 4.0.1-1.2004.0 500 500 focal-cran40/ Packages 4.0.1-1.1804.0 500 500 bionic-cran40/ Packages 4.0.0-1.2004.0 500 500 focal-cran40/ Packages 4.0.0-1.1804.0 500 500 bionic-cran40/ Packages 3.6.3-1bionic 500 500 bionic-cran35/ Packages 3.6.2-1bionic 500 500 bionic-cran35/ Packages 3.6.1-3bionic 500 500 bionic-cran35/ Packages 3.6.1-1bionic 500 500 bionic-cran35/ Packages 3.6.0-2bionic 500 500 bionic-cran35/ Packages 3.6.0-1bionic 500 500 bionic-cran35/ Packages 3.5.3-1bionic 500 500 bionic-cran35/ Packages 3.5.2-1bionic 500 500 bionic-cran35/ Packages 3.5.1-2bionic 500 500 bionic-cran35/ Packages 3.5.1-1bionic 500 500 bionic-cran35/ Packages 3.5.0-1bionic 500 500 bionic-cran35/ Packages 3.4.4-1ubuntu1 500 500 bionic/universe i386 Packages 3.0.2-1ubuntu1.1~esm2 -32768 -32768 trusty-infra-security/main i386 Packages
2

1 Answer

Usually R-packages installation require their compilation, so special dedicated r-base-dev package is needed, install it with:

sudo apt-get update
sudo apt-get install r-base-dev

Also you can see that errors are self-explanatory, the relevant development libraries for blas and lapack are missed. To install them and other needed packages use commands below:

sudo apt-get install liblapack-dev libblas-dev libssl-dev libcurl4-openssl-dev libxml2-dev

And then retry by running

R -e install.packages('tidyverse')
7

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like