LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-28-2009, 05:44 AM   #1
dbbolton
LQ Newbie
 
Registered: Sep 2009
Location: WV
Distribution: Debian
Posts: 28

Rep: Reputation: 15
chroot: expect: command not found


I am now on 6.12 binutils: http://www.linuxfromscratch.org/lfs/.../binutils.html

When I run:
Code:
expect -c "spawn ls"
I get:
Code:
bash: expect: command not found
Googling for this problem brought up a bunch of results for "spawn command not found", but I couldn't find "expect".

It seems like something has gone horribly wrong.
 
Old 11-28-2009, 05:59 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi again,

Did you forget to install expect (chap 5.12) or did that install throw errors?

At this point (chapter 6) expect should reside in /tools/bin.

Hope this helps.
 
Old 11-28-2009, 06:43 AM   #3
dbbolton
LQ Newbie
 
Registered: Sep 2009
Location: WV
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: 15
Here is a snippet from user lfs's 'history':

Code:
  289  tar xf expect-5.43.0.tar.gz
  290  cd expect-5.43
  291  patch -Np1 -i ../expect-5.43.0-spawn-1.patch
  292  patch -Np1 -i ../expect-5.43.0-tcl_8.5.5_fix-1.patch
  293  cp -v configure{,.orig}
  294  sed 's:/usr/local/bin:/bin:' configure.orig > configure
  295  ./configure --prefix=/tools --with-tcl=/tools/lib   --with-tclinclude=/tools/include --with-x=no
  296  time make
  297  make test
  298  make SCRIPTS="" install

Last edited by dbbolton; 11-28-2009 at 06:44 AM.
 
Old 11-28-2009, 06:55 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

That only shows you typed the commands (which tells me you did not 'forget' this package). It does not show if all went well during compile and install.

Did you check to see if expect is present in /tools/bin?

Also check to see if your current PATH is correct (typo when entering the chrooted env??) and check if the re-adjusting of the tools chain was done correctly.
 
Old 11-28-2009, 07:08 AM   #5
dbbolton
LQ Newbie
 
Registered: Sep 2009
Location: WV
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: 15
From the host system:

Code:
lfs@ganymed:~$ find /tools/bin -iname 'exp*'
/tools/bin/expand
/tools/bin/expr
From the chroot env:

Code:
echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
 
Old 11-28-2009, 08:08 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Do I need to tell you expect is not installed or did you reach that conclusion already?
 
Old 11-28-2009, 08:24 AM   #7
dbbolton
LQ Newbie
 
Registered: Sep 2009
Location: WV
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: 15
Yes, I can see that. What am I supposed to do about it? I have already run configure, make, and make install, and obviously that didn't work. So am I supposed to do it again and hope it turns out different this time?

Last edited by dbbolton; 11-28-2009 at 08:26 AM.
 
Old 11-28-2009, 09:08 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

You need to make sure that all the steps taken have the desired result(s). There is a small chance that you didn't do anything "wrong", this being a developers version of LFS.

If you need to go back to chapter 5 to install expect, you probably have to start from scratch (too many things have changed between installing expect and the point you are now).

I would suggest to use the stable LFS and not the developers version (did I assume correctly that this is your first lFS?).
 
Old 11-28-2009, 10:14 AM   #9
dbbolton
LQ Newbie
 
Registered: Sep 2009
Location: WV
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: 15
Yes, this is my first try. I don't mind the occasional setback- I just want to find out what caused it.

Do you think the LFS mailing list would be interested to hear about this problem, or should I just scrap the system and start over with stable?
 
Old 11-28-2009, 10:40 AM   #10
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

If this would be my first LFS encounter I would start over. Even though this is a developers version I would put the blame on myself first.

Having a look at the mailing list cannot hurt, maybe someone did actually encounter the same problem you are having. But like I stated before I wouldn't raise an issue before making sure I wasn't to blame.

If you start from scratch again, do use the stable version. It works (I'm running on (B)LFS 6.5 atm).

Hope this helps.

BTW: My first attempt to install LFS failed completely, the second one worked like a charm. One thing I found out early: Don't deviate from the book before you know how LFS is set up and knowing what the possible impacts of your change are.

Tip: After you finish chapter 5 make a backup (also mentioned in chap 5.32). If something goes wrong later on you can wipe it all, put back the backup and start fresh with chapter 6.

Another tip: If at all possible don't stop after you start chapter 6. I never encounter problems when installing chapter 6 to end in one go. If I stop halfway and need to setup the environment again, about 50% of the time bad things start happening.
 
1 members found this post helpful.
Old 11-28-2009, 02:11 PM   #11
dbbolton
LQ Newbie
 
Registered: Sep 2009
Location: WV
Distribution: Debian
Posts: 28

Original Poster
Rep: Reputation: 15
Thanks for the tips. I'm starting over with stable right now.
 
Old 12-06-2009, 07:33 PM   #12
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
I don't think you need to start over. You could just exit the chroot go back and reinstall expect make sure you get not build errors when running make then reenter and continue. expect is obviously not a major problem building the other packages since they all completed successfully and your so early in the final part of the build process.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
bash: chroot: command not found satimis Linux From Scratch 9 03-15-2010 08:38 AM
[SOLVED] Execute a command using expect visu_kvg Linux - Newbie 4 08-05-2009 10:08 AM
How to use expect command? jprathap Linux - Newbie 1 11-21-2008 10:30 PM
chroot - bin/sh not found Artanicus Slackware 8 05-16-2005 04:26 AM
chroot and shared libs not being found. netstv Linux - General 3 11-05-2004 11:36 AM

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

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