R Package installation fails with "libopenblas.so.3: cannot open shared object file"
Recently, I had trouble updating some R packages that require openblas. The error R gives is*: “libopenblas.so.3: cannot open shared object file: No such file or directory”. It seems some other people experience the same problem. With a symlink we can fix the problem quickly.
First, we check if any libopenblas.so is on our filesystem:1
locate libopenblas.so
## /usr/lib/libopenblas.so
## /usr/lib/libopenblas.so.0
## /usr/lib/libopenblas.so.0.3
## /usr/lib/libopenblas.so.3
Here, we can already see the problem. There is no file libopenblas.so.3, but only libopenblas.so.0.3. Let us simply make a symlink from 0.3 to 3:
sudo ln -s /usr/lib/libopenblas.so.0.3 /usr/lib/libopenblas.so.3
That is it, now package installation should work again.
If you do not have
locate
, install it first.↩︎