LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Installation: Source vs RPM (https://www.linuxquestions.org/questions/linux-general-1/installation-source-vs-rpm-396108/)

zeevolking 12-23-2005 09:56 PM

Installation: Source vs RPM
 
I've been using Suse 10 everyday for about 2 weeks now. I think i'm finally comfortable with linux (it doesn't seem so weird as when I first started). I'm using it as my home desktop OS (and pretty much everything else).
Installing programs, I noticed theres basically 2 paths to choose from, either compile from source, or install from rpm. RPM to me seems to be much more organized and easier to manage, especially with YAST. I did a couple installs from source, and though the program works perfectly, I have no idea where everything installed to, or how to remove it from my system.
What do you guys think about source and/or rpm installs ? Should I compile from source, or use RPM, or a combo of both ? How do I manage source installs ? Are there any other routes ? Basically I want to be in control of my system, I want to be able to know whats installed, and be able to update/remove it if necessary. I'm not sure if its related to all my source installs that i've done, but certain parts of my gnome launcher are failing to work now (I click them, yet nothing happens [ex: I click yast2 launcher and nothing happens, so I must open up a command terminal, make myself root, and type "yast2" to launch YAST).

Whats your opinion on installing from source, rpm, or "other"?

Cirdan 12-23-2005 11:47 PM

Building packages allows you to patch them as soon as a patch or a fix releses..instead of waiting till someone makes an installer. Also...when compiling packages...they are usualy installed to /usr/bin or /usr/local/bin. It mostly depends what kind of program it is. If it is a system specific, where only root can run it, it's probably in /sbin or /usr/sbin.

bigrigdriver 12-24-2005 09:06 AM

The problem with rpms is that you can't always find a .rpm or .src.rpm for the app you want.

The problem with source installs is that you can't update or upgrade a source installation unless you can find diffs or patches for the particular app.

Enter stow and epkg. Both work in much the same way. They create a directory in /usr/local (called stow or encap, depending on which you use). When invoked to install a source package, a folder is created under /usr/local/encap/<packagename>, and the entire contents are installed there, then symlinked to the normal installation locations.

Source packages can be upgraded by downloading the upgrade source and installing in the same way. Stow and epkg will detect the existing installation, and upgrade it to the new version. No parallel installations.

Removing the app is as easy as deleting the folder and its contents.

They also include a command to chase down and remove the symlinks.

clinux_rulz 12-24-2005 10:16 AM

You can actually do a proper uninstall from the source code. You may not have noticed, but for the Windows binary uninstalls, Windows keeps the installer program and reuses it for the uninstall. The same thing is done with the linux installs from the source code.

To install:

>> su
Password:
>> cd /usr/src
>> cp ~thatsme/downloads/crazy-code.tar.gz .
>> tar -xvzf crazy-code.tar.gz
>> cd crazy-code
>> ./configure
>> make
>> make install
>> exit

To uninstall:

>> su
Password:
>> cd /usr/src/crazy-code
>> make uninstall
>> cd ..
>> rm -rf crazy-code crazy-code.tar.gz
>> exit

I'm not sure if you install the same way I do it, but I'm sure what ever your using can uninstall source code installs too.

Note: using "make uninstall" does not require you to figure out where things went.

The main trade off between source vs binary installs is that, source install take longer but are more suited to your machine and processes (MMX support and stuff), and binary installs are quicker but are more suited to a generic machine that most processes amongst other things can handle.

I recommend using source. And if you do not like compiling source, then use the source rpms (crazy-code-source.rpm). The source rpms will be source code with the simplicity of installation/uninstallation of rpms.

clinux_rulz 12-24-2005 10:52 AM

It is generally easier to find diffs and patches for source code distributions too, but too upgrate you must uninstall as shown in my last post, then apply the diff file to the crazy-source.tar.gz, and then install again.

If you where to look at projected on source forge you might find that the diff files are mainly for the source packages and not the binary ones.

Komakino 12-24-2005 12:38 PM

Source is superior as far as I'm concerned. Plus something oft overlooked is checkinstall ( http://asic-linux.com.mx/~izto/checkinstall/ ) which will create a package for your system (either rpm, deb, or tgz (slackware)) which can then be uninstalled in the usual fashion for that sort of package. Once installed, you create packages using:
Code:

./configure (where applicable - not all sources have configure scripts)
make
checkinstall (as root, to create a package)
then either:
rpm -i packagename.rpm
dpkg -i packagename.deb
installpkg packagename.tgz

The single biggest advantage of compiling from source is that dependencies are easier to settle. For example, if an rpm was compiled against library foo.so version 3.1 then you will need EXACTLY foo.so version 3.1 on your computer to satisfy that dependency. If you compile from source though, it will just check that the version of foo.so on your computer is AT LEAST a particular version.

GUIPenguin 12-24-2005 10:30 PM

I use source.. as I run gentoo on everything from my LTSP servers to web and file servers, to my laptop and desktop where I watch my dvds on. I like to think of everything this way.. If your going to be running linux on your system.. build it for YOUR system and not just some generic x86. My linux systems run a hellofa lot faster then a generic suse or fedora install, even with full media and guis. Also source is nice because you can append -- and other stuff along with build options when you configure it.. but installing program source code through a gui?...to..touchy feely..


All times are GMT -5. The time now is 11:13 AM.