27

I use EndeavourOS and have updated my system on February 17 2022 using

sudo pacman -Syu

Eversince, when I run docker-compose, I get this error message:

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

Some forum threads suggested to reinstall docker-compose, which I did. I tried the following solution, but both without success:

Python3.7: error while loading shared libraries: libpython3.7m.so.1.0

How can I resolve this issue?

Matthias Braun
  • 32,039
  • 22
  • 142
  • 171
T_Torture
  • 401
  • 1
  • 5
  • 9

5 Answers5

56

Install libxcrypt-compat from pacman (Official Repositories)

long-blade
  • 721
  • 1
  • 5
  • 9
17

Same thing happened to me today, this is what I did to fix it (Arcolinux 5.16.10-arch1-1)

Removed docker-compose

$ sudo rm -r /usr/local/bin/docker-compose

Reinstalled it using pip (was not working with the curl method)

$ sudo pip install docker-compose
Dharman
  • 30,962
  • 25
  • 85
  • 135
dam0ne
  • 179
  • 2
  • 3
    Note this installs old (v1) version of `docker-compose`, while the one being currently developed is v2. Also, manually removing binaries is definitely NOT a recommended way of removing software from any Linux-based system. – Maks Babarowski Feb 23 '22 at 22:55
  • 2
    @MaksBabarowski: Thank you! I had V1 installed before, so it is suitable for the time being. Docker suggests in their docs to uninstall by remove binaries manually. – T_Torture Feb 26 '22 at 19:59
15

I use Arch Linux and it worked for me:

 # cd /usr/lib
 # sudo ln ./libcrypt.so libcrypt.so.1
 # docker-compose -v

 docker-compose version 1.29.2, build 5becea4c
Matthias Braun
  • 32,039
  • 22
  • 142
  • 171
Lindomar
  • 167
  • 5
3

The underlying issue here is that you use docker-compose instead of docker compose, which are two different binaries. docker-compose is also known as V1, and is deprecated since April 26, 2022. Since then, it does not receive updates or patches, other than high-severity security patches.

So, to fix your issue, use docker compose instead of docker-compose. If you compare docker compose version and docker-compose version, you will see that this uses the newer docker compose and runs without an issue.

thraizz
  • 66
  • 8
2

I found several forum posts explaining to isntall libxcrypt-compat from AUR. I did not like this solution, but apparently, this is the way for now: https://bbs.archlinux.org/viewtopic.php?id=274160&p=2

If there is a PGP key error when building the package from AUR, use this workaround as explained by Stock44 on this page: https://aur.archlinux.org/packages/libxcrypt-compat

$ gpg --keyserver keyserver.ubuntu.com --recv-key 678CE3FEE430311596DB8C16F52E98007594C21D

Posted on behalf of the question asker

Dharman
  • 30,962
  • 25
  • 85
  • 135