Results 1 to 4 of 4

Thread: proper --prefix= when installing from source

  1. #1
    Join Date
    Jan 2008
    Beans
    19
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    proper --prefix= when installing from source

    ehm i dont know if its really for beginners, but its pretty basic. If needed a mod should feel free to move it where it needs.


    Whats the proper prefix flag you what you need to declare when you're ./configure -ing a program for an installation from the source?


    In other words, how you're complete this ? ./configure --prefix=???

  2. #2
    Join Date
    Feb 2007
    Location
    perdita
    Beans
    1,622
    Distro
    Ubuntu

    Re: proper --prefix= when installing from source

    Code:
    ./configure --prefix=PREFIX
    This will install the binary (or libraries/header files) into PREFIX/bin, PREFIX/lib or PREFIX/include for example when you run "make install".

    ex:
    Code:
    ./configure --prefix=/usr/
    Note:
    Try
    Code:
    ./configure --help
    It usually offers a lot of interesting options and help.
    Last edited by KIAaze; June 23rd, 2009 at 08:47 PM.

  3. #3
    Join Date
    Jan 2008
    Beans
    19
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: proper --prefix= when installing from source

    Most of the times, i dont use the prefix when configuring, thus it get installed to the default dir, which can be whatever. I want to keep all as much humanly possible organized.

    So the proper prefix is /usr/ ?

  4. #4
    Join Date
    Feb 2007
    Location
    perdita
    Beans
    1,622
    Distro
    Ubuntu

    Re: proper --prefix= when installing from source

    As far as I know, the most common prefixes used for installations from source are:
    Code:
    /usr
    /usr/local
    /opt
    /opt/shared
    /usr is often the default and is where debian packages usually put their binaries. So in that sense, yes, it's the proper prefix.

    cf also:
    http://en.wikipedia.org/wiki/Filesys...archy_Standard
    http://www.pathname.com/fhs/
    http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/

    You can also set the prefix to somewhere in your home directory, so you don't need the root password and keep your root system clean.
    For libraries, I recommend using /usr or /usr/local, because otherwise, you'll have to set LD_LIBRARY_PATH to use them.
    Last edited by KIAaze; June 23rd, 2009 at 09:16 PM.

Tags for this Thread

Bookmarks

Posting Permissions

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