[lfs-support] xz: No such file or directory

Ken Moffat zarniwhoop at ntlworld.com
Tue Jan 1 16:03:22 PST 2013


On Tue, Jan 01, 2013 at 03:23:21PM -0800, JIA Pei wrote:
> Hi, all:
> 
> I'm building LFS SVN 20130101, however, I don't know how to solve the
> following problem:
> 
> *root:/# xz*
> *bash: /tools/bin/xz: No such file or directory*
> 
> There are 2 potential causes:
> 1) I didn't prepare the tool xz before moving to the next stage, namely,
> chapter 6. But now, I've already re-prepared it. Still, I got the above
> error message continuously.
> 2) Maybe I've already prepared the tool xz before chapter6, in such a case,
> xz cannot be well prepared in this SVN.
> 
> 
> Did anybody have the same issue?
> 
http://www.linuxfromscratch.org/lfs/faq.html#any-no-such-file

 Your english is good, but you do not understand what you are doing.
Making errors is common, and many of us have learned from our own
errors.  But we needed to put some effort into understanding what
went wrong.

 In this specific case, from the *host* run
ldd /tools/bin/xz

 That will show you at least one link to a host library in /usr or
/lib, instead of a link to a library in /tools.  Perhaps you have
similar erors in other packages - as well as not correctly adjusting
the toolchain (as mentioned in the FAQ), this can also happen if you
stopped the build and then returned to it without setting up the
environment correctly.

 I recall you posted that your sd card had become unmounted because
of inactivity : that is a weird thing to happen, but perhaps
plausible for desktop distros which try to guess, wrongly, what you
want to do.

 You also said you had built LFS, but it didn't boot.  Rebuilding
LFS in the hope that will fix the problem is silly : sometimes, a
rebuild is needed, but until you understand *why* it won't boot you
are grasping at straws.  Often, fixing the kernel config, or
/etc/fstab, or the grub command line, will get a system which boots.
It all depends on the exact error.

 And finally, since you didn't respond to my earlier post, why are
you building on a card ?  Booting removable (usb) storage is harder,
and (cheap, consumer-grade) cards and sticks are not intended for
long-term use with "sane" filesystems - they are built down to a
price, and targetted at the wear patterns of FAT filesystems.
Expect them to die suddenly.

 So, I recommend you examine every package you installed in /tools
to determine which of them are linked to host libraries, and then
spend some time thinking about how you built them (e.g. leaving the
system, and reloading it) so that you do not repeat the same
procedural mistakes.  I guess by now that you have learned to remove
the source directories (and any build directories) when building a
package the second time, but I'll stress that again to emphasize it.

 Building LFS can be quite hard, there is no need to make it harder
for yourself.

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce



More information about the lfs-support mailing list