/usr/bin/ld: cannot find -llapack

前端 未结 3 2004
生来不讨喜
生来不讨喜 2020-12-05 04:21

I am seeking help for installation in ubuntu 14.04. I am installing a package in my pc. They have their makefiles. I have to run make.

When I did I found error like.

相关标签:
3条回答
  • 2020-12-05 05:02

    On Ubuntu 14.04 make sure you have the packages

    • liblapack-dev
    • liblapack3
    • libopenblas-base
    • libopenblas-dev

    installed. After that, "-L/usr/lib -llapack -lblas" should work. Also note that, as already mentioned in another answer, in the output you showed, you have "-L/usr/share/doc/liblacpack -L/usr/share/doc/libblas", which is certainly not what you want.

    0 讨论(0)
  • 2020-12-05 05:15

    My error was like this:

    /usr/bin/ld: cannot find -lgfortran

    I solved the problem following this post in here

    sudo ln -s /usr/lib/gcc/x86_64-linux-gnu/4.9/libgfortran.so /usr/lib/libgfortran.so
    

    N.B. I know this is an old post. But I spent a lot of time to solve this and in the end, it was very simple. I hope others having the same problem can solve this very quickly.

    0 讨论(0)
  • 2020-12-05 05:23

    Just install packages that contain liblapack.so.* and libblas.so.* libraries. If you are sure that those packages are already installed - just find them by: find / -name 'liblapack*' and add that path to gcc with -L/path/to/liblapack.

    edit: In your invocation of fortran compiler there are some directories given with -L - but are you sure that needed libraries are located in documentation directories: -L/usr/share/doc/liblapack -L/usr/share/doc/libblas ?

    0 讨论(0)
提交回复
热议问题