Hello Fellas, I am following Linux From Scratch - Version 8.3 .
I am stuck on the section 6.51 in compiling python.
Everything goes fine until I execute command "make".
After executing make, it gives me the following error:
Code:
(lfs chroot) root:/sources/Python-3.7.0# make -j 8
LD_LIBRARY_PATH=/sources/Python-3.7.0:/lib/libz.so.1 ./python -E -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
./python: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
generate-posix-vars failed
make: *** [Makefile:596: pybuilddir.txt] Error 1
Any idea how to fix it?
Thanks in advance!
Update: I removed the Python folder and again extracted it, configured it and issued make command(which goes fine) and then when I issued make install command now I get the following error:
Code:
Traceback (most recent call last):
File "/sources/Python-3.7.0/Lib/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/sources/Python-3.7.0/Lib/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/sources/Python-3.7.0/Lib/ensurepip/__main__.py", line 5, in <module>
sys.exit(ensurepip._main())
File "/sources/Python-3.7.0/Lib/ensurepip/__init__.py", line 204, in _main
default_pip=args.default_pip,
File "/sources/Python-3.7.0/Lib/ensurepip/__init__.py", line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/sources/Python-3.7.0/Lib/ensurepip/__init__.py", line 27, in _run_pip
import pip._internal
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [Makefile:1122: install] Error 1