Results 1 to 5 of 5

Thread: Make, install and all the rest...

  1. #1
    Join Date
    Jun 2008
    Location
    Dublin, Ireland
    Posts
    298

    Default Make, install and all the rest...

    Hi,

    If you install software using zypper, or the Yast installer it does everything for you, like for example if it was openssl, it would put it into /usr/sbin/openssl.

    However, if you install from a tarball using ./configure, make, make install, it installs everything into the directory you are currently in which could be anywhere. That's fine until you have to use it again, and then you have to remember where you extracted it to etc etc. Am I missing something here?

    Up to now I have been putting stuff like that into an applications folder off $HOME and then adding the executable to /usr/sbin/ manually. Just wondering what other people do..?

    /jlar

  2. #2
    Join Date
    Nov 2008
    Location
    Calgary, Ab, Canada
    Posts
    18

    Default Re: Make, install and all the rest...

    Actually, I think you are wrong about a few things here.
    1. "make install" usually, i.e. I have never seen otherwise, installs everything in /usr/local or /usr by default. Executables go to /usr/local/bin, libraries go to /usr/local/lib etc. So unless you give the configure script the --prefix option, that is the case.
    2. /usr/sbin is intended for system commands - note the "s" in the name. Don't put your own files there. If you really really want to put your executables outside your home directory, put them in /usr/local/bin, but that's not necessary - see further.
    3. you can put the executable to $HOME/bin or you can make a symbolic link in that directory to the actual location of your file. $HOME/bin is usually included in $PATH so you will be able to run your commands from there just fine.

    As for me, I install a lot of custom built software in $HOME/programs and then just add $HOME/programs/bin to $PATH in .bashrc and $HOME/programs/lib to $LD_LIBRARY_PATH

  3. #3
    Join Date
    Aug 2008
    Location
    Seattle, WA
    Posts
    1,376

    Default Re: Make, install and all the rest...

    Quote Originally Posted by eeijlar View Post
    Hi,

    If you install software using zypper, or the Yast installer it does everything for you, like for example if it was openssl, it would put it into /usr/sbin/openssl.

    However, if you install from a tarball using ./configure, make, make install, it installs everything into the directory you are currently in which could be anywhere. That's fine until you have to use it again, and then you have to remember where you extracted it to etc etc. Am I missing something here?

    Up to now I have been putting stuff like that into an applications folder off $HOME and then adding the executable to /usr/sbin/ manually. Just wondering what other people do..?

    /jlar
    A suggestion would be to create a "projects" or a "sources" directory. Always read the "INSTALL" and "README" files before compiling and installing from source. Finally, install checkinstall. This will build an rpm to install the package. The advantage in this is that it will be added to your RPM database and be easier to manage.

  4. #4
    Join Date
    Jun 2008
    Location
    Dublin, Ireland
    Posts
    298

    Default Re: Make, install and all the rest...

    Quote Originally Posted by prosolin View Post
    Actually, I think you are wrong about a few things here.
    1. "make install" usually, i.e. I have never seen otherwise, installs everything in /usr/local or /usr by default. Executables go to /usr/local/bin, libraries go to /usr/local/lib etc. So unless you give the configure script the --prefix option, that is the case.
    2. /usr/sbin is intended for system commands - note the "s" in the name. Don't put your own files there. If you really really want to put your executables outside your home directory, put them in /usr/local/bin, but that's not necessary - see further.
    3. you can put the executable to $HOME/bin or you can make a symbolic link in that directory to the actual location of your file. $HOME/bin is usually included in $PATH so you will be able to run your commands from there just fine.

    As for me, I install a lot of custom built software in $HOME/programs and then just add $HOME/programs/bin to $PATH in .bashrc and $HOME/programs/lib to $LD_LIBRARY_PATH
    Hi,

    Thanks for your reply.. ok, that makes sense.

    In that case then, if /usr/local/sbin is for "your own stuff" as it were, then why is it not in the PATH:

    Code:
    /usr/bin:/sbin:/home/myhome/bin:/usr/local/bin:/usr/sbin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/kde3/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin
    I have never modified my PATH, so that must be the OpenSuse default. I know you could add it to your path in your profile, but I would have thought it would be there already.

    /jlar

  5. #5
    palladium NNTP User

    Default Re: Make, install and all the rest...

    careful, always be sure to *read* the (usually named) README inside
    the tar ball it will usually tell you to compile and install the
    program thusly:

    run 'configure' as yourself
    run 'make' as yourself
    then su to root and
    run 'make install' as root

    doing it that way the executable will (usually) be installed in
    /usr/bin and the documentation in /usr/share/doc/[something]
    (additionally, there may be supporting programs, libraries and
    whatever installed where they 'should be' in root's system)

    there ARE exceptions, and you may (if you wish--or if you are on a
    system administered by some other person, and do not have root access)
    install to a directory within your /home by running 'make install' as
    yourself....in which case only you can use it--that is, if you have
    installed (say) Google's browser in your home, and add a guest account
    for someone else to use, then they will be **unable* to use Chrome..

    --
    palladium

Posting Permissions

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