Linux Mint环境下R语言安装deSolve包编译失败求助
Fixing "cannot find -lblas" Error When Installing deSolve in R on Linux Mint
Hey Maryam, I’ve dealt with this exact compilation error a few times on Debian/Ubuntu-based distros like Linux Mint—let’s get this sorted out quickly!
The error /usr/bin/ld: cannot find -lblas means your system is missing the BLAS (Basic Linear Algebra Subprograms) development libraries, which are required to compile R packages that rely on linear algebra operations (like deSolve). Here’s how to fix it:
- First, update your system’s package index to ensure you’re pulling the latest package versions:
sudo apt update - Install the core BLAS development package:
sudo apt install libblas-dev - While you’re at it, it’s a good idea to install the LAPACK development library too (many R packages depend on it alongside BLAS):
sudo apt install liblapack-dev - Once those are installed, open R again and try installing deSolve once more:
install.packages("deSolve")
If you still run into issues (unlikely, but just in case), you can try installing the optimized OpenBLAS version instead—it works as a drop-in replacement for the default BLAS library:
sudo apt install libopenblas-dev
内容的提问来源于stack exchange,提问作者Maryam
相关产品推荐
相关产品推荐

