LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-27-2005, 11:56 PM   #1
gatblast45
Member
 
Registered: Aug 2003
Location: United States
Distribution: Mandriva 2006
Posts: 59

Rep: Reputation: 15
LFS 6 Chapter 6.3 chroot error


Hello!
Please help me! I am trying to build the latest linux from scratch. everything has worked great up to chapter 6.3, where i enter the command:

chroot "$LFS" /tools/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
/tools/bin/bash --login +h

it outputs:

/tools/bin/bash: error while loading shared libraries: libtermcap.so.2: cannot open shared object file: No such file or directory

i am afraid if i continue on, ignoring this error could lead to more problems. But i am not sure what to do yet so any advice clues or anything would be very much appreciated

thanks,
mike

p.s.
i am running:
LFS SVN-20050417 (recent version, hopefully this isn't related to the problem)
Slackware 10.1
with stock kernel 2.6 from disc 2 /testing
 
Old 04-28-2005, 07:34 AM   #2
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
in LFS bash should be linked with ncurses and not termcap
 
Old 04-28-2005, 12:33 PM   #3
gatblast45
Member
 
Registered: Aug 2003
Location: United States
Distribution: Mandriva 2006
Posts: 59

Original Poster
Rep: Reputation: 15
do you think its something wrong with what i did in the ncurses section?
 
Old 04-28-2005, 12:43 PM   #4
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
to know if bash is correctly linked, try: ldd /tools/bin/bash
for example, here is my bash:
Code:
ldd /bin/bash
        libncurses.so.5 => /usr/lib/libncurses.so.5 (0x4001f000)
        libdl.so.2 => /lib/libdl.so.2 (0x40065000)
        libc.so.6 => /lib/libc.so.6 (0x40068000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
 
Old 04-28-2005, 01:25 PM   #5
gatblast45
Member
 
Registered: Aug 2003
Location: United States
Distribution: Mandriva 2006
Posts: 59

Original Poster
Rep: Reputation: 15
Ok heres what it outputs:

root@darkstar:~# ldd /tools/bin/bash
linux-gate.so.1 => (0xffffe000)
libtermcap.so.2 => not found
libdl.so.2 => /tools/lib/libdl.so.2 (0x40018000)
libc.so.6 => /tools/lib/libc.so.6 (0x4001c000)
/tools/lib/ld-linux.so.2 (0x40000000)

root@darkstar:~# ldd /bin/bash
linux-gate.so.1 => (0xffffe000)
libtermcap.so.2 => /lib/libtermcap.so.2 (0x4002e000)
libdl.so.2 => /lib/libdl.so.2 (0x40033000)
libc.so.6 => /lib/libc.so.6 (0x40037000)
/lib/ld-linux.so.2 (0x40000000)


when i try the chroot command i still recieve the error, and i do not see any prompt "I have no name!" as the chapter says you should see.


btw thankyou so much for helping me
 
Old 04-28-2005, 01:35 PM   #6
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Well in your chapter 5 try to recompile Bash with the following options:
Code:
./configure --enable-static-link --prefix=/tools --with-curses --without-bash-malloc
 
Old 04-28-2005, 02:32 PM   #7
gatblast45
Member
 
Registered: Aug 2003
Location: United States
Distribution: Mandriva 2006
Posts: 59

Original Poster
Rep: Reputation: 15
It worked!
I ran the chroot command again and it gave me the "I have no name!" prompt

Thanks so much for helping me! I woulda never figured it out by myself
 
Old 12-31-2007, 07:00 AM   #8
zalmaygul
LQ Newbie
 
Registered: Feb 2007
Posts: 13

Rep: Reputation: 0
error while loading shared libraries

hello sir

I am trying to install lfs-6.2 using interprise linux as host system.

When I chroot to lfs in chater 6 I get the following eror mesage

error while loading shared library libtermcap.so.2 : cannot open shared object file no such file or directory.

I foolowed the instruction as you wrote to do like
./configure --enable-static-link --prefix=/tools --with-curses --without-bash-malloc

but still I am getting the same error

please help

thanks
zalmay
 
Old 01-01-2008, 03:12 AM   #9
dwhitney67
Senior Member
 
Registered: Jun 2006
Location: Maryland
Distribution: Kubuntu, Fedora, RHEL
Posts: 1,541

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
After performing the (re)'configure', did you perform the 'make' and 'make install'?

As Oliv' recommended, run this command to verify your bash executable is built correctly:
Code:
ldd /tools/bin/bash
 
  


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
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 12:31 AM
LFS 6 Chapter 6.8 mount error gatblast45 Linux From Scratch 20 01-04-2006 05:48 PM
ERROR IN??: lfs 6.0 chapter 5.35. Udev-030 jobesd Linux From Scratch 4 01-31-2005 05:05 PM
now getting error in coreutils test(chapter 6-lfs-5.1.1) linuxbh Linux From Scratch 2 09-16-2004 02:45 AM
LFS 3.3 - chapter 6 - glibc error fend88 Linux From Scratch 5 04-28-2002 11:06 PM

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

All times are GMT -5. The time now is 04:46 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