Error while loading shared libraries: libz.so.1

  • Post author:
  • Post last modified:May 26, 2023
  • Reading time:1 mins read

Problem

While building an Android app project under Studio, the build process terminated with the error,

/home/user1/Android/Sdk/build-tools/22.0.1/zipalign: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Error:Execution failed for task ':app:zipalignDebug'.
> Process 'command '/home/user1/Android/Sdk/build-tools/22.0.1/zipalign'' finished with non-zero exit value 127

Solution

The problem was resolved by installing the lib32z1 package.

$ sudo apt-get install lib32z1
Share

Karunesh Johri

Software developer, working with C and Linux.