DEV Community

Achraf-cyber
Achraf-cyber

Posted on

How to use zlib in Termux

Some programs in Termux needs zlib to run. Specially python apps such as buildozer. But they always run to an issue even though you install zlib by pkg install zlib.
If you encounter such issue just run termux-chroot before running your app.
In debian-like system (such as termux), program expect zlib header to be in usr/includes/zlib.h
But in termux it is stored in $PREFIX/includes/zlib.h
When run termux-chroot, your $PREFIX will become /usr/
So you can use the program.
Happy coding

Top comments (0)