Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

libcblas.so.3: cannot open shared object file: No such file or directory #5290

Closed
salemmohammed opened this issue Mar 7, 2017 · 10 comments
Closed

Comments

@salemmohammed
Copy link

salemmohammed commented Mar 7, 2017

Hi all,

Operating System:
I am working on a cluster of 3 machines AWS ubuntu 14.04 and Python2.7.
I am following the official site for installation and running the code for distributed training.

When I execute this:

../../tools/launch.py -n 2 -H hosts --sync-dst-dir /tmp/mxnet
python train_mnist.py --network lenet --kv-store dist_sync

This is the error:

Traceback (most recent call last):
File "train_mnist.py", line 10, in
from common import find_mxnet, fit
File "/tmp/mxnet/common/find_mxnet.py", line 4, in
import mxnet as mx
File "/tmp/mxnet/mxnet/init.py", line 7, in
from .base import MXNetError
File "/tmp/mxnet/mxnet/base.py", line 46, in
_LIB = _load_lib()
File "/tmp/mxnet/mxnet/base.py", line 38, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL)
File "/usr/lib/python2.7/ctypes/init.py", line 365, in init
self._handle = _dlopen(self._name, mode)
OSError: libcblas.so.3: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "train_mnist.py", line 10, in
from common import find_mxnet, fit
File "/tmp/mxnet/common/find_mxnet.py", line 4, in
import mxnet as mx
File "/tmp/mxnet/mxnet/init.py", line 7, in
from .base import MXNetError
File "/tmp/mxnet/mxnet/base.py", line 46, in
_LIB = _load_lib()
File "/tmp/mxnet/mxnet/base.py", line 38, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL)
File "/usr/lib/python2.7/ctypes/init.py", line 365, in init
self._handle = _dlopen(self._name, mode)
OSError: libcblas.so.3: cannot open shared object file: No such file or directory

Any Idea?

@max246
Copy link

max246 commented May 4, 2017

To solve this issue you have to install libatlas-base-dev

sudo apt-get install libatlas-base-dev

@szha
Copy link
Member

szha commented Sep 29, 2017

This issue is closed due to lack of activity in the last 90 days. Feel free to ping me to reopen if this is still an active issue. Thanks!

@szha szha closed this as completed Sep 29, 2017
@anirudhacharya
Copy link
Member

Using OS - "Linux ip-172-31-7-81 4.9.76-3.78.amzn1.x86_64" and python 2.7.
Tried -

import mxnet as mx
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/site-packages/mxnet/init.py", line 25, in
from . import engine
File "/usr/local/lib/python2.7/site-packages/mxnet/engine.py", line 23, in
from .base import _LIB, check_call
File "/usr/local/lib/python2.7/site-packages/mxnet/base.py", line 111, in
_LIB = _load_lib()
File "/usr/local/lib/python2.7/site-packages/mxnet/base.py", line 103, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
File "/usr/lib64/python2.7/ctypes/init.py", line 357, in init
self._handle = _dlopen(self._name, mode)
OSError: libgfortran.so.3: cannot open shared object file: No such file or directory

[ec2-user@ip-172-31-7-81 ~]$ sudo yum install libatlas-base-dev
Loaded plugins: priorities, update-motd, upgrade-helper
amzn-main | 2.1 kB 00:00:00
amzn-updates | 2.5 kB 00:00:00
No package libatlas-base-dev available.
Error: Nothing to do

But not able to use mxnet on this instance.

@szha
Copy link
Member

szha commented Jan 23, 2018

@anirudhacharya for missing libgfortran.so.3 you need gfortran package instead of atlas.

@anirudhacharya
Copy link
Member

@szha yum does not have gfortran just like libatlas-base-dev.
$ sudo yum install gfortran
Loaded plugins: priorities, update-motd, upgrade-helper
No package gfortran available.
Error: Nothing to do

@szha
Copy link
Member

szha commented Jan 23, 2018

yum has a subcommand to help you find the file you need, yum provides libgfortran.so.3. The output tells you which package to install.

@anirudhacharya
Copy link
Member

@szha
$ yum provides libgfortran.so.3
Loaded plugins: priorities, update-motd, upgrade-helper
libgfortran-4.4.6-4.81.amzn1.i686 : Fortran runtime
Repo : amzn-main
Matched from:
Provides : libgfortran.so.3

libgfortran-4.8.5-11.135.amzn1.i686 : Fortran runtime
Repo : amzn-main
Matched from:
Provides : libgfortran.so.3

libgfortran-6.4.1-1.45.amzn1.i686 : Fortran runtime
Repo : amzn-main
Matched from:
Provides : libgfortran.so.3

libgfortran-6.4.1-1.45.amzn1.i686 : Fortran runtime
Repo : @amzn-main
Matched from:
Provides : libgfortran.so.3

I installed the above package -
$ sudo yum install libgfortran-6.4.1-1.45.amzn1.i686

But when I try to import mxnet it still gives the same error -

import mxnet as mx
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/site-packages/mxnet/init.py", line 25, in
from . import engine
File "/usr/local/lib/python2.7/site-packages/mxnet/engine.py", line 23, in
from .base import _LIB, check_call
File "/usr/local/lib/python2.7/site-packages/mxnet/base.py", line 111, in
_LIB = _load_lib()
File "/usr/local/lib/python2.7/site-packages/mxnet/base.py", line 103, in _load_lib
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
File "/usr/lib64/python2.7/ctypes/init.py", line 357, in init
self._handle = _dlopen(self._name, mode)
OSError: libgfortran.so.3: cannot open shared object file: No such file or directory

@anirudhacharya
Copy link
Member

Also for the following packages, I am not able to find corresponding yum packages - liblapack-dev, liblas-dev, gfortran. I could usually install these packages with apt-get but yum is not able to find them.

$ sudo yum provides liblapack-dev
Loaded plugins: priorities, update-motd, upgrade-helper
No matches found
$ sudo yum provides liblas-dev
Loaded plugins: priorities, update-motd, upgrade-helper
No matches found
$ sudo yum provides gfortran
Loaded plugins: priorities, update-motd, upgrade-helper
No matches found

@anirudhacharya
Copy link
Member

The AMI images of AWS does not have these packages. Installing them worked.
sudo yum -y install gcc-c++
sudo yum -y install gcc-gfortran
sudo yum -y install blas
sudo yum -y install lapack
sudo yum -y install atlas-sse3-devel

Thanks.

@iGEM-Thessaloniki-2019
Copy link

iGEM-Thessaloniki-2019 commented Aug 25, 2019

In Ubuntu 18.04, the following error:

sander: error while loading shared libraries: libgfortran.so.3: cannot open shared object file: No such file or directory

was fixed by running

sudo apt-get install libgfortran3:amd64

Also, in place of amd64 the I am aware of the following options: i386, i586, i686, x86_64.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants