Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alpine python3 Error relocating /usr/lib/libpython3.6m.so.1.0: getrandom: symbol not found

After installing latest alpine ( 3.8 ) with python I got following error

$ docker run -it alpine:3.8 sh
/ # sed -i -e 's/v[[:digit:]]\.[[:digit:]]/edge/g' /etc/apk/repositories
/ # apk add python3
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
(1/11) Installing libbz2 (1.0.6-r6)
(2/11) Installing expat (2.2.6-r0)
(3/11) Installing libffi (3.2.1-r5)
(4/11) Installing gdbm (1.13-r1)
(5/11) Installing xz-libs (5.2.4-r0)
(6/11) Installing ncurses-terminfo-base (6.1_p20180818-r1)
(7/11) Installing ncurses-terminfo (6.1_p20180818-r1)
(8/11) Installing ncurses-libs (6.1_p20180818-r1)
(9/11) Installing readline (7.0.003-r1)
(10/11) Installing sqlite-libs (3.24.0-r1)
(11/11) Installing python3 (3.6.6-r2)
Executing busybox-1.28.4-r1.trigger
OK: 67 MiB in 24 packages

/ # python3
Error relocating /usr/lib/libpython3.6m.so.1.0: getrandom: symbol not found

For some reason libpython3.6m.so.1.0 is not compatible with alpine

like image 752
elmariofredo Avatar asked Jan 28 '23 06:01

elmariofredo


1 Answers

Seems like incompatibility with older version of musl and can be easily resolved by

/ # apk upgrade musl
(1/8) Upgrading musl (1.1.19-r10 -> 1.1.20-r2)
(2/8) Upgrading busybox (1.28.4-r1 -> 1.29.3-r0)
Executing busybox-1.29.3-r0.post-upgrade
(3/8) Upgrading alpine-baselayout (3.1.0-r0 -> 3.1.0-r2)
Executing alpine-baselayout-3.1.0-r2.pre-upgrade
Executing alpine-baselayout-3.1.0-r2.post-upgrade
(4/8) Upgrading libressl2.7-libcrypto (2.7.4-r0 -> 2.7.4-r1)
(5/8) Upgrading libressl2.7-libssl (2.7.4-r0 -> 2.7.4-r1)
(6/8) Upgrading libressl2.7-libtls (2.7.4-r0 -> 2.7.4-r1)
(7/8) Upgrading ssl_client (1.28.4-r1 -> 1.29.3-r0)
(8/8) Upgrading musl-utils (1.1.19-r10 -> 1.1.20-r2)
Executing busybox-1.29.3-r0.trigger
OK: 67 MiB in 24 packages
/ # python3
Python 3.6.6 (default, Oct 18 2018, 16:04:36) 
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
like image 193
elmariofredo Avatar answered May 15 '23 11:05

elmariofredo