libc.musl-x86_64.so.1: cannot open shared object file

Viewed 15603

I catch this error when trying to run Django database migration:

File "/home/xxx/virtualenv/xxx/lib64/python3.6/site-packages/drf_ujson/renderers.py", line 4, in <module>
    import ujson
ImportError: libc.musl-x86_64.so.1: cannot open shared object file: No such file or directory

Environmet details:

  • ujson version 1.35
  • drf-ujson version 1.2
  • pip version 18.1
  • python version 3.6.7
  • Fedora 27, linux kernel 4.19

Have you seen this error before? Can you give me some advises to debug this, please?

1 Answers

Had the same issue with amazonlinux image

Firstly you need to install musl lib. It's absent in yum so you have to compile it from source

curl https://musl.libc.org/releases/musl-1.2.2.tar.gz -o musl-1.2.2.tar.gz
tar -xvf musl-1.2.2.tar.gz
cd musl-1.2.2
./configure
make 
make install

and then

ln -s /usr/lib64/libc.so.6 /usr/lib64/libc.musl-x86_64.so.1

if there is no file libc.so.6 in /usr/lib64 try to find it using find / -name 'libc.so*' . Dest file should be at the same directory with libc.so. For instance if file has path /usr/lib/libc.so.6 your command will be ln -s /usr/lib/libc.so.6 /usr/lib/libc.musl-x86_64.so.1

Related