LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   tar installation (https://www.linuxquestions.org/questions/linux-software-2/tar-installation-591998/)

ravee20 10-15-2007 01:54 PM

tar installation
 
Im new to linux and just installed fedora 7.
I've some linux softwares which are in tar archive format.
tar archive (softwares) are usually installed using
Code:

./configure
make
make install

commands.
correct me if i'm wrong,these tar archive's consist of source file and above commands are used to compile those files and create binaries.

In this process of installation,i get dependency errors after executing
Code:

./configure
command
reporting somthing like "xxx.x file missing".
the problem is i can not make out which library consist of this (header)file
ok even if i resolve this one error after searching/dloading lib, next time when i again run the configure command new/next dependency error shows up.this is annoying.i cant go for internet for each error.
i want to know is there any way wherein we'll get to know
-the list of dependency libraries (not perticular file in that lib)
-do they already exist in my system
-if i have older/newer version of library installed then how to upgrade/downgrade to required version

and finally after all tries if installation fails then
how to clean/delete/uninstall the partially installed files/libs??

regards

jailbait 10-15-2007 02:05 PM

I suggest that you use checkinstall to change the tarballs into rpm packages. Then you can do the various things that you want to do using the rpm command.

http://www.asic-linux.com.mx/~izto/checkinstall/

--------------------
Steve Stites

The_JinJ 10-15-2007 02:08 PM

Dependancy errors can be a right royal PITA - no easy way afaik

To clean up an installed prog you could try make uninstall to see if it exists - or use checkinstall
You could also use make --prefix=PATH to install to a different location

b0uncer 10-15-2007 02:14 PM

You're partially right. Many software projects distributed in compressed (.gz or .bz2 or such) archives (.tar) are source code; it's not a necessity, but often the case. And yes, most of them are installed as "./configure && make && make install", by configuring the source, compiling it and then executing the install targets (copy files to the right locations on the filesystem). Again, it's not always like that (so you should always read README and/or INSTALL files first), but often it is.

When you build source code, you are responsible for having all the needed parts. The configure script helps you in this, it checks (or should check) that you have everything needed in place, and if not, should inform you about what is missing (a good configure script checks all dependencies and reports them at once, in a clear way, but some may stop at the first error and just give you a single file missing -- it's up to you to take the steps to fulfill the needs). Before even going to that you should read the README and INSTALL files, because they usually clearly state what you need in order to build the code. And the place where you downloaded the archive should also state the dependencies. Read before you rush :) If you want automated dependency checking and fetching, you'll need to use precompiled binaries + a package manager..like yum, apt, pacman, ...

Every source installation can be different, so refer to the doc files - where ever they are. Nothing is written in stone when it's about source code - each programmer can decide how he puts the thing together, some just have agreed to do it according to certain "standards". This is why binary packages exist, to make it easier to install software on a certain kind of system.

1) Determine if you can install a pre-compiled binary pacakge, or if you need to compile from source.
2) Refer to the place where you get the source to see what things you need to have in place before proceeding to compiling the source.
3) Check which dependencies you have (+versions), and get and install all missing dependencies before doing anything with the original program.
4) Download, extract and configure the program source code - check that configure script (or equivalent) exits cleanly, without errors (or warnings either).
5) Compile the code with 'make', pay attention to any errors.
6) Use the install target of make, if available, to have the ready files copied into right places.
7) When needed you can possibly uninstall the program (remove the files that you copied with 'make install' from your system) by issuing, in the source directory, 'make uninstall' - this works, if there is an 'uninstall' target for make. It's up to the program maker and doesn't necessarily work :)
8) You can have some tools to help you out. For example checkinstall can be used (in the 'make install' step) in certain cases to track the file placements that the install rule would do, and to consist an installable-and-removable package for your system. If you use checkinstall instead of the "normal" method, you can afterwards just remove the produced package using your package manager (if available), and not worry about removing the "installed" files one by one yourself.

Source code compilations are not a standard process, unless the maker wanted so. Everything's possible, so read the docs before going further :)


All times are GMT -5. The time now is 04:32 AM.