LinuxQuestions.org
Visit Jeremy's Blog.
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 02-15-2019, 12:05 PM   #1
invinciblycool
LQ Newbie
 
Registered: Jan 2019
Posts: 24

Rep: Reputation: Disabled
bzip2 fails to run


While following LFS 8.3 with my host system as Debian, I had built bzip2. But now on running bzip2, it gives me the following error.

Code:
bzip2: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory
The output of `ldconfig -v` is below:

Code:
ldconfig: Can't stat /opt/lib: No such file or directory
    ldconfig: Can't stat /libx32: No such file or directory
    ldconfig: Can't stat /usr/lib64: No such file or directory
    ldconfig: Can't stat /usr/libx32: No such file or directory
    /usr/local/lib:
    /lib:
    ldconfig: Cannot stat /lib/libreadline.so: No such file or directory
    	librt.so.1 -> librt-2.28.so
    	libdl.so.2 -> libdl-2.28.so
    	libpcprofile.so -> libpcprofile.so
    	libhistory.so.7 -> libhistory.so.7.0
    	libSegFault.so -> libSegFault.so
    	libBrokenLocale.so.1 -> libBrokenLocale-2.28.so
    	libnss_compat.so.2 -> libnss_compat-2.28.so
    	libcap.so.2 -> libcap.so.2.25
    	libpthread.so.0 -> libpthread-2.28.so
    	libnss_hesiod.so.2 -> libnss_hesiod-2.28.so
    	libacl.so.1 -> libacl.so.1.1.2253
    	libnss_dns.so.2 -> libnss_dns-2.28.so
    	libutil.so.1 -> libutil-2.28.so
    	libmvec.so.1 -> libmvec-2.28.so
    	libbz2.so.1.0 -> libbz2.so.1.0.6
    	libanl.so.1 -> libanl-2.28.so
    	libm.so.6 -> libm-2.28.so
    	libcrypt.so.1 -> libcrypt-2.28.so
    	libthread_db.so.1 -> libthread_db-1.0.so
    	libkmod.so.2 -> libkmod.so.2.3.3
    	libresolv.so.2 -> libresolv-2.28.so
    	liblzma.so.5 -> liblzma.so.5.2.4
    	libmemusage.so -> libmemusage.so
    	libattr.so.1 -> libattr.so.1.1.2448
    	ld-linux-x86-64.so.2 -> ld-2.28.so
    	libreadline.so.7 -> libreadline.so.7.0
    	libz.so.1 -> libz.so.1.2.11
    	libnss_files.so.2 -> libnss_files-2.28.so
    	libnsl.so.1 -> libnsl-2.28.so
    	libncursesw.so.6 -> libncursesw.so.6.1
    	libnss_db.so.2 -> libnss_db-2.28.so
    	libc.so.6 -> libc-2.28.so
    /lib64:
    	ld-linux-x86-64.so.2 -> ld-lsb-x86-64.so.3
    /usr/lib:
    	libgcc_s.so.1 -> libgcc_s.so.1
    	libgdbm_compat.so.4 -> libgdbm_compat.so.4.0.0
    	libubsan.so.1 -> libubsan.so.1.0.0
    	libitm.so.1 -> libitm.so.1.0.0
    	libasan.so.5 -> libasan.so.5.0.0
    	libasprintf.so.0 -> libasprintf.so.0.0.0
    	libgettextsrc-0.19.8.1.so -> libgettextsrc.so
    	libmagic.so.1 -> libmagic.so.1.0.0
    	liblsan.so.0 -> liblsan.so.0.0.0
    	libpanelw.so.6 -> libpanelw.so.6.1
    	libatomic.so.1 -> libatomic.so.1.2.0
    	libltdl.so.7 -> libltdl.so.7.3.1
    	libmpfr.so.6 -> libmpfr.so.6.0.1
    	libgmp.so.10 -> libgmp.so.10.3.2
    	libgettextpo.so.0 -> libgettextpo.so.0.5.4
    	libblkid.so.1 -> libblkid.so.1.1.0
    	libuuid.so.1 -> libuuid.so.1.3.0
    	libfl.so.2 -> libfl.so.2.0.0
    	libgmpxx.so.4 -> libgmpxx.so.4.5.2
    	libgdbm.so.6 -> libgdbm.so.6.0.0
    	libopcodes-2.31.1.so -> libopcodes.so
    	libexpat.so.1 -> libexpat.so.1.6.8
    	libbfd-2.31.1.so -> libbfd.so
    	libformw.so.6 -> libformw.so.6.1
    	libcc1.so.0 -> libcc1.so.0.0.0
    	libssp.so.0 -> libssp.so.0.0.0
    	libgomp.so.1 -> libgomp.so.1.0.0
    	libstdc++.so.6 -> libstdc++.so.6.0.25
    	libmenuw.so.6 -> libmenuw.so.6.1
    	libgettextlib-0.19.8.1.so -> libgettextlib.so
    	libmount.so.1 -> libmount.so.1.1.0
    	libtsan.so.0 -> libtsan.so.0.0.0
    	libmpc.so.3 -> libmpc.so.3.1.0
    	libquadmath.so.0 -> libquadmath.so.0.0.0
Also here is the version check if it is of any use.

This probably has something to do with symlinking, but not sure what and where to link.
 
Old 02-15-2019, 02:20 PM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,571
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Are we talking about chapter 5 (toolkit) or chapter 6 (final versions)? I notice that you have a multilib setup, so it is unlikely to be chapter 6 which must be done in chroot. LFS itself does not do multilib, though Debian does. Your ldconfig printout isn't relevant as it is clearly the one from the Debian host.

Are you sure your new bzip2 was installed in $LFS/tools and that you are running it as the lfs user with the correct environment? What is the output of "echo $PATH"?
 
Old 02-16-2019, 11:05 AM   #3
invinciblycool
LQ Newbie
 
Registered: Jan 2019
Posts: 24

Original Poster
Rep: Reputation: Disabled
I am talking about chapter 6.

The output of `echo $PATH` while chrooted is

Code:
/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
 
Old 02-16-2019, 11:25 AM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,571
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Your path is correct but the ldconfig output still looks weird. It seems to be picking up directories from the host's /etc/ld.so.conf file. Those 32-bit directories, libx32 and /usr/libx32 are not present in LFS so they should not be searched for in the chroot environment. What does the LFS /etc/ld.so.conf file look like?
 
Old 02-16-2019, 11:26 AM   #5
invinciblycool
LQ Newbie
 
Registered: Jan 2019
Posts: 24

Original Poster
Rep: Reputation: Disabled
I am sorry. I was a bit impatient and I think it would be better to start afresh.
Thanks a lot for your time.
 
Old 02-16-2019, 11:38 AM   #6
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,571
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Don't just start again from chapter 5. It's very likely that something went wrong in chapter 4, when you were setting up the environment. When you get really weird results, that's often where the problem lies. It will save time in the long run if you go through that chapter again carefully and make sure you have done everything exactly as specified before you start building your toolset.

Don't beat yourself up! The first LFS build never works.
 
Old 02-16-2019, 11:40 AM   #7
invinciblycool
LQ Newbie
 
Registered: Jan 2019
Posts: 24

Original Poster
Rep: Reputation: Disabled
Thanks for the motivation. This was my fifth try. I always mess up something or the other at some point. Let's see if I can pull this off this time.
Thanks again for the piece of advice.
 
Old 03-06-2019, 06:37 AM   #8
invinciblycool
LQ Newbie
 
Registered: Jan 2019
Posts: 24

Original Poster
Rep: Reputation: Disabled
I realised that all this while I was using kernel version 3.16, while the recommended kernel version is 3.2+
Probably that was the cause of the error.
Started afresh on a Fedora VM running Linux kernel version 4.2
 
Old 03-06-2019, 07:45 AM   #9
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,571
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Using Fedora doesn't help! It's got a bad reputation in LFS circles.
 
  


Reply

Tags
bzip2



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
bzip2: (stdin) is not a bzip2 file. error Aqua_Regia Linux - Newbie 16 09-18-2020 02:37 AM
ERROR :bzip2: (stdin) is not a bzip2 file. error k84834 Linux - Newbie 1 08-12-2012 08:11 AM
chapter 6, want to use bzip2 but it fails with bash: bzip2: No such file or directory nomad5000 Linux From Scratch 2 10-12-2009 08:58 PM
bzip2 install problem safrout Linux From Scratch 5 09-08-2002 04:43 PM
tar bzip2 and the -y option mark33andathird Linux - General 1 04-30-2002 12:22 PM

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

All times are GMT -5. The time now is 02:58 AM.

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