error while loading shared libraries: libz.so.1:

What are the eight life cycle hook functions of Vue>>>

For example, there is a problem when compiling Android 4.2 with Ubuntu 12.04-64 bit: error while loading shared libraries: libz. So. 1: cannot open shared object file: no such file or directory

Solution: it’s obvious to install the package where the library is located, but how do we know which package libz. So. 1 is in?We use the command: apt file search to find. First, install it and press the following command:

<!-- lang: shell -->
sudo apt-get install apt-file

After installation, the system will prompt you to update. If there is no prompt, enter the following command in the terminal:

<!-- lang: shell -->
sudo apt-file update

Apt file is used to find the package of a command or a library. The specific usage is as follows:

<!-- lang: shell -->
dell@dell-OptiPlex-7010:~$ apt-file search libz.so.1
lib32z1: /usr/lib32/libz.so.1
lib32z1: /usr/lib32/libz.so.1.2.3.3
lib32z1-dev: /usr/lib32/libz.so
lsb-build-base3: /usr/lib/lsb3/libz.so
zlib1g: /lib/libz.so.1
zlib1g: /lib/libz.so.1.2.3.3
zlib1g-dbg: /usr/lib/debug/lib/libz.so.1.2.3.3
zlib1g-dbg: /usr/lib/debug/usr/lib32/libz.so.1.2.3.3
zlib1g-dev: /usr/lib/libz.so

Just use apt file search to find the package where your library is located. The one on the right is the one that matches your library, and the one on the left is the package where your library is located

<!-- lang: shell -->
sudo apt-get install lib32z1

If only to solve the problem, just the above command is OK

Similar Posts: