I want to run a matlab code in ubuntu 12.04 in which error is coming that liblapack.so shared library file is missing. How to get this file installed and from where can I get this file.Please help me please its urgent.
Simply install the following
sudo apt-get install libatlas3-base
If you do
sudo apt-cache search liblapack.so
You will find 2 files, install one then and you will have
liblapack3 - Library of linear algebra routines 3 - shared version libatlas3-base - Automatically Tuned Linear Algebra Software, generic shared
You can find liblapack.so.3 for either quantal or raring (liblapack for precise is not available) at the following URLs:
- quantal i386: http://packages.ubuntu.com/quantal/i386/liblapack3/filelist
- quantal amd64: http://packages.ubuntu.com/quantal/amd64/liblapack3/filelist
- raring i386: http://packages.ubuntu.com/raring/i386/liblapack3/filelist
- raring amd64: http://packages.ubuntu.com/raring/amd64/liblapack3/filelist
You can find liblapack3 for precise (Ubuntu 12.04) in this PPA: ppa:andrikos/ppa
- precise i386: https://launchpad.net/~andrikos/+archive/ppa/+build/3887507/+files/liblapack3_3.4.1-4%7Eprecise1_i386.deb
- precise amd64: https://launchpad.net/~andrikos/+archive/ppa/+build/3887506/+files/liblapack3_3.4.1-4%7Eprecise1_amd64.deb
Save the package, open the compressed package with Archive Manager, and browse the archive to find the liblapack.so.3 file.
In Ubuntu 14.04 and beyond, you can install liblapack3 directly from the default Ubuntu repositories.
As others have suggested, if you can install the relevant package on your system, that is the best approach. But perhaps you are not able to do that.
If you can get hold of a correct copy of
liblapack.so anywhere on your system, you can just add that directory to your
LD_LIBRARY_PATH - there is no need to officially 'install' it on your system.
One option is to compile lapack yourself. Unfortunately, it is a little difficult to do so. By default, it will create a non-shared file
liblapack.a, and that is not sufficient in many cases. (For me, python's
scipy insisted on the
cmake to compile lapack for a shared objects (
.so) as suggested by this comment. I had tried many other things first, but I found it easier to compile and install
cmake locally than to try to build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/lapack-3.5.0 -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_SHARED_LIBS=ON ../lapack-3.5.0