Error loading Python lib '/tmp/_MEIR5kRcn/libpython3.7m.so.1.0': dlopen: libcrypt.so.1 during running docker-compose
Asked Answered
N

5

10

I am having this problem running Docker Compose on my machines. I have switched machines and the problem still persists.

Error Message:

[40335] Error loading Python lib '/tmp/_MEIR5kRcn/libpython3.7m.so.1.0': dlopen: libcrypt.so.1: cannot open shared object file: No such file or directory

My OS is fully updated.

I have tried the solutions listed here, here and here.

Here is the output of ldd --version.

ldd (GNU libc) 2.35

Docker itself is functioning as expected. Docker-compose, however, isn't. Trying to docker-compose up or docker-compose --version results in the error.

Null answered 2/3, 2022 at 8:43 Comment(0)
R
31

install libxcrypt-compat maybe helps

sudo pacman -S libxcrypt-compat

https://archlinux.org/packages/core/x86_64/libxcrypt-compat

Residentiary answered 8/3, 2022 at 3:30 Comment(0)
F
13

I had the same issue in my EC2 instance and I solved it by running this command

sudo dnf install libxcrypt-compat

This command should be run under root user for it to work.

Film answered 15/6, 2023 at 15:52 Comment(0)
P
8

I fix this issue by created a symbolic link from libcrypt.so to libcrypt.so.1

Link this: $ ln -s /usr/lib/libcrypt.so /usr/lib/libcrypt.so.1

Hope it's worked for you

Pharmacology answered 2/3, 2022 at 12:34 Comment(3)
Could you please explain what is happening and why your solution works? And why this error is occurring even after a clean install? Thank you so much for this answer. It worked.Null
It worked for me too, thanks! I was having this problem when trying to execute docker-compose on Arch Linux.Directional
Hi @Rashiq, it's worked because docker-compose required libcrypt.so.1 as we see in the error message, but when you install libcrypt no link .1 is created, but we have libcrypt.so, so you need to created what docker-compose want because any way docker-compose need libcrypt.so. But I not yet know why some lib ask / created some link .1, .2... probably for compatibility reason with other system.Pharmacology
L
2

This was my solution: delete directories ./build and ./dist and run pyinstaller again.

I noticed that if ./build already exists, Pyistaller will reuse the same ./build. Any previous issues in ./build will persist, sometimes with new error messages, because the directory was not recreated. Deleting ./build leads to a new ./build being created next time you run pyinstaller.

This was the original error I was getting.

$ ./name_of_executable_created_by_pyinstaller 
[26645] Error loading Python lib '/tmp/_MEITnO6JV/libpython3.7m.so': dlopen: /tmp/_MEITnO6JV/libpython3.7m.so: cannot open shared object file: No such file or directory
Londalondon answered 6/8, 2022 at 19:57 Comment(0)
P
0

I was running on manjaro. I had to remove docker-compose, install it back and symlink to it's actual location. I don't know if this works on other distros.

sudo rm $(which docker-compose)

Now install it back;

sudo pacman -S docker-compose

Finally create a symlink;

sudo ln -s /usr/bin/docker-compose /usr/local/bin/docker-compose

Confirm it's fine;

docker-compose --version
Placement answered 26/1, 2023 at 5:42 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.