Search code examples
cinstallationlapackblas

Installing LAPACK and BLAS Libraries for C on Mac OS


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.


Solution

  • 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.