LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   question about installing binaries correctly (https://www.linuxquestions.org/questions/linux-software-2/question-about-installing-binaries-correctly-443396/)

jimjamjahaa 05-10-2006 06:10 AM

question about installing binaries correctly
 
if i have a program like epsxe for example, that comes precompiled in a tar, where should i more it in the system for it to be executable with just a

# epsxe

command?

it comes with all kinds of resources in a folder too. im just confused because when i apt-get something, its automatically set up to work with just 1 terminal command

jschiwal 05-10-2006 07:03 AM

The first thing to do is read through the README and INSTALL files. They may have recommendations.
Some precompiled programs will have a script that you run to install them. Others have a "Makefile".
If it has a file named "Makefile", then cd to that directory and run "sudo make install". The makefile should set things up properly. Most likely in this case, the program will end up in /usr/local/bin/. The libraries in /usr/local/lib/. If the directories in this softwares directory are "bin", "lib", and "doc", then the contents could to into /usr/local/bin, /usr/local/lib. If there is a folder with pdf or html documentation, a good place for it would be in /usr/share/doc/packages/epxse/.

The /usr/share/bin/ directory should be in your path. Type in "echo $PATH" to make sure. Also check if /usr/local/lib is in your '/etc/ld.so.conf' file. If not add it and run as root "ldconfig". This will update your library paths.

Large suites, like KDE and Gnome, are usually installed under /opt. You could simply move the entire directory under /opt. If you did this you would either need to add "/opt/epxse/bin" to your path variable in your ~/.profile or ~/.bash_login file or create a link to the application in /usr/bin/. You would also need to add /opt/epxse/lib/ to the "ld.so.conf" file and run "ldconfig" as root. For example, if you have KDE installed there is '/opt/kde3/bin' in your PATH variable and and entry "/opt/kde3/lib" in the "/etc/ld.so.conf" file.

An advantage to having it in /opt, is that everything is together, and not dispersed through the /usr/local directory hierarchy. A disadvantage is that it isn't in a standard location and you need to set up your paths as a result.

GL1800 05-10-2006 07:54 AM

May be useful here to point out that the path for the install is determined during the ./configure step. This way: ./configure --prefix=/usr/local
That's just considered "good practice", as it prevents collisions between the rpms you install and the things you compile. Then, you get a choice between them.

jimjamjahaa 05-10-2006 02:52 PM

Quote:

Originally Posted by jschiwal
The first thing to do is read through the README and INSTALL files. They may have recommendations.
Some precompiled programs will have a script that you run to install them. Others have a "Makefile".
If it has a file named "Makefile", then cd to that directory and run "sudo make install". The makefile should set things up properly. Most likely in this case, the program will end up in /usr/local/bin/. The libraries in /usr/local/lib/. If the directories in this softwares directory are "bin", "lib", and "doc", then the contents could to into /usr/local/bin, /usr/local/lib. If there is a folder with pdf or html documentation, a good place for it would be in /usr/share/doc/packages/epxse/.

The /usr/share/bin/ directory should be in your path. Type in "echo $PATH" to make sure. Also check if /usr/local/lib is in your '/etc/ld.so.conf' file. If not add it and run as root "ldconfig". This will update your library paths.

Large suites, like KDE and Gnome, are usually installed under /opt. You could simply move the entire directory under /opt. If you did this you would either need to add "/opt/epxse/bin" to your path variable in your ~/.profile or ~/.bash_login file or create a link to the application in /usr/bin/. You would also need to add /opt/epxse/lib/ to the "ld.so.conf" file and run "ldconfig" as root. For example, if you have KDE installed there is '/opt/kde3/bin' in your PATH variable and and entry "/opt/kde3/lib" in the "/etc/ld.so.conf" file.

An advantage to having it in /opt, is that everything is together, and not dispersed through the /usr/local directory hierarchy. A disadvantage is that it isn't in a standard location and you need to set up your paths as a result.

thanks, thats pretty helpful :D

jschiwal 05-11-2006 02:09 AM

Quote:

May be useful here to point out that the path for the install is determined during the ./configure step.
This is useful information, generally, but in his case, he isn't installing from a tarball, but has a directory with precompiled binaries. So he most likely doesn't have a ./configure step. But it gives me an opportunity to add that you can enter "./configure --help" to get information on other options. Often, this will give you boilerplate options that you get by default with every autoconf'ed ./configure script, but sometimes there will be additional options that could be of interest.


All times are GMT -5. The time now is 02:30 AM.