LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   chroot: expect: command not found (https://www.linuxquestions.org/questions/linux-from-scratch-13/chroot-expect-command-not-found-772080/)

dbbolton 11-28-2009 05:44 AM

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.

druuna 11-28-2009 05:59 AM

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.

dbbolton 11-28-2009 06:43 AM

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


druuna 11-28-2009 06:55 AM

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.

dbbolton 11-28-2009 07:08 AM

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


druuna 11-28-2009 08:08 AM

Do I need to tell you expect is not installed or did you reach that conclusion already?

dbbolton 11-28-2009 08:24 AM

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?

druuna 11-28-2009 09:08 AM

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?).

dbbolton 11-28-2009 10:14 AM

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?

druuna 11-28-2009 10:40 AM

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.

dbbolton 11-28-2009 02:11 PM

Thanks for the tips. I'm starting over with stable right now.

exvor 12-06-2009 07:33 PM

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.


All times are GMT -5. The time now is 03:31 PM.