LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 11-19-2018, 08:44 AM   #1
HQuser
LQ Newbie
 
Registered: Dec 2017
Posts: 6

Rep: Reputation: Disabled
Error while trying to make Python 3 in section 6.51


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

Last edited by HQuser; 11-19-2018 at 08:50 AM.
 
Old 11-19-2018, 11:20 AM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
Dose tools/lib/libz.so.1 exist?

did you foget
mv -v /usr/lib/libz.so.* /lib
ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so

end of zlib page
 
1 members found this post helpful.
Old 11-20-2018, 05:52 AM   #3
HQuser
LQ Newbie
 
Registered: Dec 2017
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Dose tools/lib/libz.so.1 exist?

did you foget
mv -v /usr/lib/libz.so.* /lib
ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so

end of zlib page
I did followed those commands and the whole process at zlib stage was normal. I tried your suggestion again but I am again getting the same error. Its really weird...
 
Old 11-20-2018, 06:37 AM   #4
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
So the file exist in /lib and are linked
Try running ldconfig
 
Old 11-20-2018, 06:45 AM   #5
HQuser
LQ Newbie
 
Registered: Dec 2017
Posts: 6

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
So the file exist in /lib and are linked
Try running ldconfig
Running ldconfig gives me no output... and after running ldconfig when I do make install in Python it still gives me same error
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
make INSTALL_HDR_PATH=dest headers_install gives 'gcc: error trying to exec' in section 6.7 iambrj Linux From Scratch 2 07-21-2019 03:51 PM
I got error while installing python-tk python-psycopg2 python-twisted saili kadam Linux - Newbie 1 09-05-2015 03:03 AM
[SOLVED] Problems in glibc section section 5.7.1 lfs 6.7 abhiklall Linux From Scratch 1 04-19-2011 02:42 AM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 08:30 PM
error using lfs while compiling lfs book's 6.12 (gcc-4.1.2) section aditya_gpch Linux From Scratch 3 04-24-2008 04:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration