Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    question about LFS --prefix=/usr

    I've completed a LFS installation, why is it that I can only successfully install packages when i add --prefix=/usr, can someone explain to me whats going on?

  2. #2
    Just Joined!
    Join Date
    Nov 2008
    Whitout --prefix=/usr, what happens?

  3. #3
    You should be able to install your packages to just about any directory. The reason LinuxFromScratch and BeyondLinuxFromScratch use "--prefix=/usr" is for this reason:

    When you install packages on regular distributions, they install to "/usr" and you can assume everything under that tree is handled by the package manager - except for "/usr/local". "/usr/local/" is the tree usually left for the user to install custom compiled source packages that are not included with the distro. However, since all packages in LFS are compiled from source and there is (usually) no package manager, LFS just suggests installing to "/usr/". It really doesn't matter as long as all the necessary environment variables also point to "/usr/local/..." .

    I personally include the following args to ./configure scripts when compiling most programs (under LFS):

    ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc \
    CFLAGS="-O3 -march=pentium2 -pipe" CXXFLAGS=$CFLAGS 
    make -j3
    Those also force /var and /etc data to their proper locations, apply optimizations for the processor, and run 3 parallel makes simultaneously.

    If you are getting errors when you try to use "--prefix=/usr", please post them. You can also run "./configure --help" for more info.

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts