vmprof-python icon indicating copy to clipboard operation
vmprof-python copied to clipboard

error: libunwind.so: cannot open shared object file: No such file or directory

Open 3zhang opened this issue 8 years ago • 5 comments

python3.6 -m vmprof --mem --web myscript.py I tried on CentOS 6.5 and Ubuntu 16. Both of them gave me this error.

Full message:

could not load libunwind at runtime. error: libunwind.so: cannot open shared object file: No such file or directory
Uploading to http://vmprof.com...
 => Uploading the cpu profile...
      http://vmprof.com/#/xxx

3zhang avatar Oct 18 '17 02:10 3zhang

Looking at that right now. As far as I can tell, the wheels (0.4.9) at least contain a built version of libunwind.so...

planrich avatar Oct 20 '17 14:10 planrich

@planrich you can reproduce it at least on Fedora by installing from HEAD tarball:

venv/bin/pip install https://github.com/vmprof/vmprof-python/archive/master.zip
venv/bin/pypy -m vmprof ...

it's because you dont look for libunwind with the SO version in the name:

ls -lha /usr/lib64/libunwind*      
lrwxrwxrwx. 1 root root  27 Jun  1 22:34 /usr/lib64/libunwind-coredump.so.0 -> libunwind-coredump.so.0.0.0
-rwxr-xr-x. 1 root root 15K Jun  1 22:34 /usr/lib64/libunwind-coredump.so.0.0.0
lrwxrwxrwx. 1 root root  18 Jun  1 22:34 /usr/lib64/libunwind.so.8 -> libunwind.so.8.0.1
-rwxr-xr-x. 1 root root 48K Jun  1 22:34 /usr/lib64/libunwind.so.8.0.1
lrwxrwxrwx. 1 root root  25 Jun  1 22:34 /usr/lib64/libunwind-x86_64.so.8 -> libunwind-x86_64.so.8.0.1
-rwxr-xr-x. 1 root root 68K Jun  1 22:34 /usr/lib64/libunwind-x86_64.so.8.0.1

Of course I can make a symlink to solve this but I guess you should try several names before giving up.

squeaky-pl avatar Oct 22 '17 17:10 squeaky-pl

For anyone who came here from Google. On Ubuntu, this can be fixed by installing libunwind-dev package:

sudo apt-get install -y libunwind-dev

hieu-n avatar Oct 28 '17 08:10 hieu-n

Can you try again with version 0.4.11.dev2? ($ pip install vmprof --pre). I tried on an ubuntu machine (32bit, 12.04) and it successfully loaded vmprof.so from the wheel.

planrich avatar Nov 28 '17 13:11 planrich

On CentOS

yum install libunwind-devel libunwind

Joeyscat avatar Mar 03 '21 02:03 Joeyscat