Installing LAPACK and BLAS Libraries for C on Mac OS

204 picture 204 · Jun 30, 2016 · Viewed 20.8k times · Source

I wanted instructions/websites from where I could download LAPACK and BLAS libraries for use in my C programs. I also wanted to know how I could link these to the gcc compiler from terminal.

Answer

Andrew Janke picture Andrew Janke · Jan 24, 2019

You can use Homebrew to take care of this for you. Just install Homebrew and then:

brew install openblas
brew install lapack

But you don't even need that: macOS already ships with BLAS and LAPACK implementations in its vecLib framework. So if your software is vecLib-aware, or you pass it the right compiler options, you don't even need to install a separate BLAS and LAPACK.