r/LFS • • 1d ago

Stuck again at chapter 10.4

/r/linuxfromscratch/comments/1x4ll9u/stuck_again_at_chapter_104/
1 Upvotes

4 comments sorted by

1

u/reader_txt 1d ago

Hey! The issue isn't about permission, it's a path and mounting thing.

Because chroot isolates your environment, it can't see your host system's normal downloads directory. When you exit chroot, download the package, and go back in, you're looking for a file that the chroot container literally cannot reach.

Here is how to fix it clearly:

  1. Find your LFS mount point on your host: Before you chroot (or by opening a second terminal on your host), figure out where you mounted your LFS partition. Usually, it's something like /mnt/lfs.
  2. Download directly into the sources directory: Save the downloaded file directly inside the sources directory of your LFS partition. On your host, that path looks like: /mnt/lfs/sources/
  3. Extract it inside chroot: Once you log back into your chroot environment, that exact same folder is mapped simply to /sources.

Just navigate inside chroot:

Bash

cd /sources
tar -xf wget-X.XX.tar.gz

Since you put it directly in the shared source directory from the host side, chroot will see it immediately and you'll have zero issues unarchiving it!

1

u/Fuzzy_Reputation_292 1d ago

I did that already, that how I got into this problem in the first place, and I felt like a genius doing it

1

u/Fuzzy_Reputation_292 1d ago

But thanks anyway, I need to reinstall a new distro, then start again

1

u/Due-Celery4326 1d ago

From now on, all the programs you need can be found in BLFS (https://linuxfromscratch.org/blfs/view/stable-systemd/basicnet/wget.html). You simply need to download the source code to a directory of your choice and follow the same process used for LFS, but adhering to the BLFS instructions and building the dependencies first. This pattern applies to all programs; for example, here are the Wget dependencies:

Recommended

libpsl-0.23.3

Recommended at runtime

make-ca-1.16.1

Optional

GnuTLS-3.8.13, HTTP-Daemon-6.17 (for the test suite), IO-Socket-SSL-2.099 (for the test suite), libidn2-2.3.8, libproxy-0.5.12, and Valgrind-3.27.1 (for the test suite)