4

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.

halfer
  • 19,471
  • 17
  • 87
  • 173
Rashiq
  • 135
  • 2
  • 10

2 Answers2

20

install libxcrypt-compat maybe helps

sudo pacman -S libxcrypt-compat

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

Gary Liu
  • 301
  • 2
7

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

Sime
  • 133
  • 11
  • 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. – Rashiq Mar 02 '22 at 12:39
  • It worked for me too, thanks! I was having this problem when trying to execute docker-compose on Arch Linux. – Caio Costa Mar 02 '22 at 20:57
  • 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. – Sime Mar 11 '22 at 10:48