How to fix R package installation /usr/bin/ld: cannot find -lblas

Problem:

While installing some R package, you see an error message like

missing_blas_error.sh
/usr/bin/ld: cannot find -lblas

Solution

You need to install the libblas development headers. On Ubuntu, you can do that using

install_libblas.sh
sudo apt -y install libblas-dev

Check out similar posts by category: R