I am trying to build a Rust app and I get the below when trying to build. This happened after I installed ndarray-linalg and ndarray.
I installed gcc and openvc. I am on macOS.
= note: ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
How do I resolve this?
which gfortran
/usr/local/bin/gfortran
I found the library here:
ls /usr/local/Cellar/gcc/8.2.0/lib/gcc/8/libgfortran.*
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/libgfortran.5.dylib
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/libgfortran.dylib
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/libgfortran.a
/usr/local/Cellar/gcc/8.2.0/lib/gcc/8/libgfortran.spec
ldconfig -p | grep fortran
-bash: ldconfig: command not found
And also ran the below:
brew reinstall gcc
How can I make sure Rust will find it?