squeaky-pl / portable-pypy

Portable 64 bit x86 PyPy binaries for many Linux distributions.
Other
478 stars 38 forks source link

error while loading shared libraries: libbz2.so.1 #80

Closed jedie closed 6 years ago

jedie commented 6 years ago

I get the same error as in #1

pypy3.5-6.0.0-linux_x86_64-portable/bin/pypy: error while loading shared libraries: libbz2.so.1: cannot open shared object file: No such file or directory

Some info:

~$ cat /etc/issue
Debian GNU/Linux 9 \n \l
$ uname -a
Linux h08 4.17.0-0.bpo.3-amd64 #1 SMP Debian 4.17.17-1~bpo9+1 (2018-08-27) x86_64 GNU/Linux
squeaky-pl commented 6 years ago

Does Debian 9 ship libbz2? what's the SONAME and filename of libbz2? Can you localize libbz2 on your distro?

Something like

cd /usr/lib64`

ls -lha libbz* 
lrwxrwxrwx. 1 root root  15 Feb 10  2017 libbz2.so.1 -> libbz2.so.1.0.6
-rwxr-xr-x. 1 root root 67K Feb 10  2017 libbz2.so.1.0.6

objdump -x /usr/lib64/libbz2.so.1 | grep SONAME
  SONAME               libbz2.so.1
jedie commented 6 years ago
/usr/lib64$ ls -lha
total 1.6M
drwxr-xr-x  3 root root   65 Aug  8 22:34 .
drwxr-xr-x 11 root root  109 Aug  8 22:34 ..
drwxr-xr-x  2 root root  12K Aug  8 22:34 gconv
lrwxrwxrwx  1 root root   19 Feb 14  2018 libstdc++.so.6 -> libstdc++.so.6.0.22
-rw-r--r--  1 root root 1.5M Feb 14  2018 libstdc++.so.6.0.22
jedie commented 6 years ago

Maybe this is helpful?!?

$ ls -la /var/lib/dpkg/info/libbz2*
-rw-r--r-- 1 root root 308 Aug  8 23:04 /var/lib/dpkg/info/libbz2-1.0:i386.list
-rw-r--r-- 1 root root 289 Jan 29  2017 /var/lib/dpkg/info/libbz2-1.0:i386.md5sums
-rw-r--r-- 1 root root  22 Jan 29  2017 /var/lib/dpkg/info/libbz2-1.0:i386.shlibs
-rw-r--r-- 1 root root  60 Jan 29  2017 /var/lib/dpkg/info/libbz2-1.0:i386.triggers
-rw-r--r-- 1 root root 194 Aug  8 23:04 /var/lib/dpkg/info/libbz2-dev:i386.list
-rw-r--r-- 1 root root 120 Jan 29  2017 /var/lib/dpkg/info/libbz2-dev:i386.md5sums
$ cat /var/lib/dpkg/info/libbz2-1.0:i386.list
/.
/lib
/lib/i386-linux-gnu
/lib/i386-linux-gnu/libbz2.so.1.0.4
/usr
/usr/share
/usr/share/doc
/usr/share/doc/libbz2-1.0
/usr/share/doc/libbz2-1.0/changelog.Debian.gz
/usr/share/doc/libbz2-1.0/changelog.gz
/usr/share/doc/libbz2-1.0/copyright
/lib/i386-linux-gnu/libbz2.so.1
/lib/i386-linux-gnu/libbz2.so.1.0
squeaky-pl commented 6 years ago

I see here that the locations are different on Debian Stretch

https://packages.debian.org/stretch/amd64/libbz2-1.0/filelist

can you look in /lib/x86_64-linux-gnu and check if you have package libbz2-1.0

squeaky-pl commented 6 years ago

@jedie these are 32 bit versions of that library, you would need 64 bit.

jedie commented 6 years ago

OK... I have no root access :( So i can't use portable-pypy ?

squeaky-pl commented 6 years ago

It would be very strange not to have libbz2.so.1 on 64 bit modern distro, portable pypy doesnt ship libbz2 inside the bundle because AFAIK every mainstream distro ships it.

In case you distro is missing libbz2.so.1 you would still be able to manually download a package for your distro and drop missing shared object into lib subdirectory of the extracted tarball.

squeaky-pl commented 6 years ago

FYI I just checked and stock Debian 9 has libbz2 and the corresponding symlink

docker run -ti debian:9 bash
root@cb0c8614eabc:/# ls -lha /lib/x86_64-linux-gnu/libbz2.so.1*
lrwxrwxrwx. 1 root root  15 Jan 29  2017 /lib/x86_64-linux-gnu/libbz2.so.1 -> libbz2.so.1.0.4
lrwxrwxrwx. 1 root root  15 Jan 29  2017 /lib/x86_64-linux-gnu/libbz2.so.1.0 -> libbz2.so.1.0.4
-rw-r--r--. 1 root root 66K Jan 29  2017 /lib/x86_64-linux-gnu/libbz2.so.1.0.4

so it's possible that your administrator tempered the distribution file system or did something weird to it.

jedie commented 6 years ago

Thank you so much for your efforts!

Think we can close this issues.