Slackware Package Management vs Compiling From Source
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Slackware Package Management vs Compiling From Source
Hello, everyone!
I installed Slackware on an old computer to learn linux more in-depth. I use Ubuntu on my laptop.
I'm sorry if this too obvious, but I am having some trouble understanding the package management/compiling from source concept. More specifically, http://howtoforge.com/the_perfect_desktop_slackware12 goes through the various ways of installing software: from ready packages (pg 4/8), from SlackBuilds (pg 6), from bin files (pg 7), and from source (pg 10).
I have no trouble understanding the idea behind using SlackBuilds to build a package and then install it with pkgtool. Easy to install and easy to manage - simply beautiful!
What I do have some difficulty with understanding is the latter two (bin files and from source). One doesn't seem to use installpkg for these two methods. And the question that I have is how do I manage these? How to I uninstall/remove them? And what happens if I happen to compile something from source that was already installed as a package (in Ubuntu if you try to install something that is already installed it just tells you that the program is the latest version and does nothing)?
What I do have some difficulty with understanding is the latter two (bin files and from source). One doesn't seem to use installpkg for these two methods. And the question that I have is how do I manage these? How to I uninstall/remove them? And what happens if I happen to compile something from source that was already installed as a package (in Ubuntu if you try to install something that is already installed it just tells you that the program is the latest version and does nothing)?
Thanks in advance!
Vico
You "manage" them just by keeping track of them. You might download all source packages to a single directory, for example, or keep a text file of everything you've installed, a database, etc.
To uninstall something you installed from source, you do "make uninstall" in the directory you unpacked and installed it from. To uninstall a .bin file, you just delete it. :-)
If you compile something that is already on your system (and then install it, I presume you mean ), it will overwrite whatever is there to the extent that the package installs to the same directories, has the same files, etc. as the stuff that's already there.
I have no trouble understanding the idea behind using SlackBuilds to build a package and then install it with pkgtool. Easy to install and easy to manage - simply beautiful!
OMG - Someone who gets it! And you came from Ubuntu!
Take a look at www.slackbuilds.org.
You'll find some SlackBuild scripts that change the .bin files (ie GoogleEarth) into a slackware package as well.
Personally I never (well, hardly ever) install "from source" without making a package. There are a number of ways to create packages from source such as SlackBuilds, src2pkg, trackinstall (part of src2pkg), makepkg, etc. Doing "make uninstall" is not reliable because it does not always work completely, sometimes it does not work at all, and it requires that you keep the source around. Much simpler to just always make packages.
I agree with BCarey. `make uninstall` relies on the fact that the developer of the application created a good uninstall rule, and this may not be the case. There are ways of detecting which files were created (eg by `make install`ing again but to a certain directory instead of to the system and deleting the new files in the system, or by later making a slackware package using exactly the same configuration options you used to install the program in the first place and subsequently uninstalling the new package you created), but it's a lot of work later on when it may be more difficult to track what files are really needed and what ones aren't. I always make a SlackBuild for a program (it's not that hard to learn to do) that creates a nice slackware package (or, if a reliable SlackBuild is available, like from slackbuilds.org or Alien's site, I'll use that) which makes installing/uninstalling/upgrading very easy. There are always repositories (like http://repository.slacky.eu/slackware-12.0/ which also contains SlackBuilds) that you can use.
What I do have some difficulty with understanding is the latter two (bin files and from source). One doesn't seem to use installpkg for these two methods. And the question that I have is how do I manage these? How to I uninstall/remove them? And what happens if I happen to compile something from source that was already installed as a package (in Ubuntu if you try to install something that is already installed it just tells you that the program is the latest version and does nothing)?
Thanks in advance!
Vico
You should look at the '/var/log/packages' & '/var/log/removed_packages/' to get some history. I too agree that you should look at 'src2pkg-1.8'.
Don't forget 'pkgtool' which is still a useful tool.
You could always 'man pkgtool', 'man installpkg', 'man removepkg' to get some background.
As for the tracking itself, then 'src2pkg' will allow you much the same as what 'checkinstall' would do in the past, only better.
Thank you all for your ideas! I completely forgot about src2pkg and the like *slapping my forehead*! I've only installed 3 programs from source, so I guess it shouldn't be too complex to back-track. I'll take a look at some scripts and will probably go back and re-install those three programs via packages.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.