LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing from source *.gz (https://www.linuxquestions.org/questions/linux-newbie-8/installing-from-source-%2A-gz-801842/)

go_kimi 04-13-2010 05:01 PM

Installing from source *.gz
 
Hi,
I'm a real newbie, but have tried to find the answer to this without any luck.

When I'm installing from a source file *.gz and I've extracted all the files to a directory, once I've run 'configure' and 'make' in the directory where the files are extracted to, will the application be 'located' in that directory.

For example, I'm trying to install Expect and Tcl on my Red Hat Fedora 10 box. I've downloaded the tcl*.gz file as there's no *.rpms available, and extracted all the files to /tmp/.

I executed 'configure' as the documentation on http://www.tcl.tk/doc/howto/compile.html indicated everything would get loaded to /usr/local by default.

Everything worked out okay, but then I started 'make', everything started to install in the /tmp directory, which is not what I wanted, I want it to be able to run out of /usr/, so I killed the make.

My question is this: when I want to install new software (not just tcl) and there's no *.rpm available, where should the *.gz be located in order for the software to install correctly, and not end up in /tmp or my home directory?

I've read through this beginner's post:

http://www.linuxquestions.org/questi...rograms-45094/

but it doesn't seem to answer my question.

None of the information in the "Red Hat Linux Bible" or on the Tcl site, or Google searches seem to answer this question.

I've downloaded and extracted a few other *.gz for different applications and have gone through the README and INSTALL files and they always seem to not indicate where to extract the files to and then run configure and make. I don't want my applications to run from my /tmp directory.

Yes, I'm a newbie!!!!

go_kimi

brianL 04-13-2010 05:06 PM

You have to run make install (as root), after make.

go_kimi 04-13-2010 05:11 PM

Thanks brianL.

So don't worry about what files are located where in the 'configure' and 'make' steps?

Didier Spaier 04-13-2010 05:30 PM

Welcome to LQ

I'm a bit surprised that no package be available for Expect and Tcl on Fedora 10.

That said, if you compile yourself an application three steps are generally needed:
"./configure" (check that all needed libraries are available and write the Makefile according to your configuration)
"make" use the Makefile to build the executable file(s), also called binaries
"make install" put the binaries where they should go.

So after make the binaries are not yet in their definitive location.

Thus you can put the *.gz (the source tarball) anywhere, that doesn't matter -- provided you don't mess up your system but centralize all your source programs somewhere.

The definitive location of the program is often /usr/local by default and can generally be changed in setting-up the "--prefix" option of the ./configure command. For instance write "./configure --prefix=/usr"

Always issue "./configure --help" before "./configure": that will tell you the default locations and available options.

brianL 04-13-2010 05:32 PM

As you mentioned, when you compile stuff yourself, it usually ends up in /usr/local. But you can change that by running:
Code:

./configure --prefix=/usr
With /usr/local, you might have to edit the PATH variable in /etc/profile. With /usr, no editing required.

brianL 04-13-2010 05:37 PM

Beaten to it by a faster typer and thinker again. :)

go_kimi 04-13-2010 05:58 PM

Thanks for the replies, now it makes sense.

RH 10/Fedora did come with the tcl RPM but it's missing some header files, so I need to install it from the source. It does not come with an Expect *.rpm. I figured they'd both be on there, but that's outside of this thread.

go_kimi 04-13-2010 05:58 PM

Thanks for the replies, now it makes sense.

RH 10/Fedora did come with the tcl RPM but it's missing some header files, so I need to install it from the source. It does not come with an Expect *.rpm. I figured they'd both be on there, but that's outside of this thread.

John VV 04-13-2010 07:27 PM

go_kimi ---
you DO know that fedora 10 is, and has been, past it's END OF LIFE
there will never be any updates to it .

if you want to use fedora then PLEASE do fresh installes EVERY 6 months when a new version is released

or use a different distro , one that has a long life
like REHL or Debain or SUSE


All times are GMT -5. The time now is 09:34 AM.