Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-09-2004, 09:06 AM   #1
LQ Newbie
Registered: Nov 2003
Location: Canada
Distribution: Slackware 10
Posts: 9

Rep: Reputation: 0
installing programs a clean way


i'm using Slackware 10. i would like to know if there's a way to install programs from sources as packages.

It's something I hate in linux... when we install from sources, the files are copied at many places in the system. the problems come when we want to uninstall them. i know that we can uninstall them if we keep the sources and use the command "make uninstall" but it's unsure since the source files must exactly the same(at least the names). also... i don't want to keep the sources of all the programs i use.

i wish that there's a way to do this. If not, i had an idea but i don't know if it can work...

I would like that the command 'make install' copies the files not in the root file system directly but in a subfolder... say /home/user/pkg-name. Then i could make a package in the slackware format: .tgz and install it, upgrade it and remove it cleanly. I don't know how to tell 'make' to install the files in a subfolder and not in the root file system.

if it works... i could just do a simple script to automate this and i think there would be no simplier and faster way to manage source packages correctly. If there's another way, i'll happy to read your suggestions
Old 08-09-2004, 09:33 AM   #2
Senior Member
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
When you are familiar with compiling from source you probably know, that there are ways to configure the source-code - mostly by running the configure-script.

You can give this script arguments that specify, for instance, where the compiled binaries and libraries are to be installed... running this script with this argument, shows them all:

./configure --help | less

There is of course still the issue to keep track of what got installed where and an easy way to remove things - in case you want to upgrade or just don't need some software anymore...

This is especially true for LFS - which has no kind of any package-management - because everything is made from source by yourself.

There are several ways to get a facility which enables you to keep track of things which got installed and also get you an easy way to uninstall things...

The one I'm using is installwatch - the adresses below may not work, because it has been some time, since I got it from one of them - check it out!
Old 08-09-2004, 02:08 PM   #3
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
There are two apps I know of which may give you what you want: stow and encap. When used as an aid to installing, they will each create a directory in /usr/local (either /usr/local/stow or /usr/local/encap). The apps will create a subfolder in their own folder, and symlink to the usual locations. Removal is as easy as encap -r <filename>. Encap also allows the upgrade of tarball installations, rather than parallel installation. It's also easy to write a simple bash script to include all the steps in the installation of a tarball, in order, with options, and have the encap utility epkg do the install for you.
For future reference, it you can't find the Slackware package you need, get a .rpm or a .deb and use Alien to convert to .tgz.
Old 08-09-2004, 02:43 PM   #4
Registered: Mar 2004
Distribution: slackware 10
Posts: 75

Rep: Reputation: 15

There is a program called checkinstall which does what you want, it installs converts the source code of any program into either .rpm, .tgz or .deb packages. If you downloaded the third CD of slac 10, you can installed checkinstall from there, i think is in the /extra folder.
If you did not download the third CD, you can go to and download the package from the /extra directory under slackware 10. Also in the slackware forum some time ago i read a post that say there was an issue if you installed the libsafe library. I think if you installed that library you were unable to use checkinstall, which by the way comes with watchinstall, anyway but you can edit a file so that you'll be able to use checkinstall. that is if you installed the safelib library. I suggest you do a search on the forum for the solution in case you installed the safelib library. If you did not installed the safelib library you'll be good.

Here's a link to the package:

Old 08-10-2004, 04:00 AM   #5
Senior Member
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 63
You can compile with --prefix=/opt/<prog_name>, and then either:
- add what is necessary to /etc/profile (PATH, LD_LIBRARY_PATH, C_INCLUDE_PATH), and /etc/;
- or make the needed links from /opt/<prog_name>/* to /usr/local/*.

The latter is how I do it, with the help of a script I wrote, in the spirit of GoboLinux.

Old 08-10-2004, 05:23 AM   #6
Registered: Jul 2004
Distribution: Slackware Current
Posts: 308

Rep: Reputation: 30
I agree with m0rt3r and would recommend checkinstall. This is the homepage where you can get the latest release.

This is very convenient because it will create the .tgz package for you.

It also has a frontend for gnome called gnome-pkgtool. You can get it here. Very useful program coz it can install .tgz packages or compile from source and install using checkinstall.
Old 08-10-2004, 03:37 PM   #7
LQ Newbie
Registered: Nov 2003
Location: Canada
Distribution: Slackware 10
Posts: 9

Original Poster
Rep: Reputation: 0
thx everybody for your help!

i'll check it out as soon as i have some time. I think i'll go with checkinstall but i'll try the other solutions too.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Very limited space, how do I clean out all programs and clutter I dont need? Javahulk Linux - General 1 03-19-2005 11:30 PM
Installing a CLEAN Debian System questions terfy Debian 31 01-08-2005 04:16 PM
"Can't run C compiled programs" on clean RH9 install smirnoff Linux - Newbie 8 03-16-2004 04:11 PM
Programs won't run using clean Mandrake 9.2 insatll Boudewijn Linux - Software 1 11-21-2003 06:02 AM
Installing programs thegreenearth Linux - Newbie 1 11-09-2001 07:35 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:14 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration