Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
source is usually .tar.gz and binary is .deb and .rpm. Source is the source code for the application and usually requires compiling the source code to install and binary packages get installed through the package manager and don't require compiling
Source needs to be compiled to run. Binaries are already compiled.
In rpms there are actually two types (binary and source). Source rpms usually have a src in the name. So a binary rpm is a source rpm that has already been compiled.
Packages like RPM and DEB are formats for distributing software for a given distribution. They usually are binary (someone has precompiled them for the distribution specifically so they might not work in other distributions), but there are sourcecode packages as well. These don't compile, they are there for people wanting sourcecode access. They often have SRC in their name, too.
The advantage of precompiled binaries is that they install more quickly, and they should work in your system if they are intended for the distribution. The drawback of precompiled binaries is that someone else has decided which options to compile into the binary and which to leave out, if any, so your binary might include options you don't need or lack ones which you do.
Source code enables you to compile the software specifically for your system, but you will usually have to solve dependencies (libraries etc. the software expects to be on your system) by yourself. Compilation takes more time than installing binaries. You get to choose your options yourself, but that also means that you have to do so.
Most distributions use a binary format for ease of use, but the fact that a given version of a distribution has certain common presets (uses a specific compiler, a specific set of libraries etc.) means that after a while no new packages for the distribution are released. Newer programs might need newer libraries, and the basis for the distribution in question cannot be changed without breaking binary compatibility. That's why you need to upgrade such distributions regularly if you want access to newer software.
Distributions like Gentoo, which compile software from source, don't need such upgrades, they go with the flow and always remain current if you update your software regularly. For instance, I installed my Gentoo in January 2006 but today I'm on a 2.6.23 kernel and using all the latest software without ever having done a system-wide upgrade or reinstallation. The price is a day of compiling updated software versions every now and then...
First you use "./configure" to tell the compiler what you have (that it can use) and where it is located. Then you "make" it (actual compile). Finally you "make install", which puts the compiled binary where your system needs it to be in order for you to use it.
One more question, let say i install a program (program named "combat") in /etc/combat/.
When I start the 'make install' command, where the file being install? Can I trace where it going to install by searching in the INSTALL file? How can I trace all the installation file?
First you are thinking in windows and trying to run Linux(this will only give you a headaches). You have to start thinking in Linux. It is a little like learning to speak a foreign language.
In Linux you do not install a program to a particular directory, Linux decides where it should be stored and puts it there (make install). This is done in order for things to be consistent across multiple machines/distros. Now you do choose where you want to compile the software (usually in the users /home space). After linux installs the software it is available from the command line (it is in your path). So if I make install a program named "fred", I can type "fred" from the command line and run the program(you do not need to know where fred is stored). On the other hand if you go to make an icon for fred, life is much better behaved if you know where fred is stored. In this case you can "locate fred", "whereis fred", or "which fred" (each tool is slightly different but 90% of the time they will be interchangeable) to find out where the file is located (usually /usr/bin/).
Now is the ugly part "How can I trace all the installation file?" and this is why using your package manager is vastly superior to compiling on your own. When you "make install" a program there are addition files that are generated along with the binary (config files,etc). Now if you are lucky the person who built your application built a make uninstall file. If that person did make a uninstall file and you want to remove the application it is no big deal, you just "make uninstall" in the same directory that you "make install"ed from, and everything should be removed. Now if they did not make a "make uninstall" file or they made a poor one, life can be difficult. You can just remove the binary and ignore any other associated files (usually the safest thing to do) or you can try and track down all the associated files(which can be a real chore). This is why the package managers are so superior. (using rpms and yum as an example) You just "yum remove application" and the application is removed along with most of the associated files. I say most because (just like make uninstall) the person who built the package may or may not have done things properly (so that everything gets removed). However most reputable repositories have been building packages long enough that they (generally) do not make these kinds of mistakes.
Thank you, I understand now. Because most of the time i install through Synaptic Package Manager(in Ubuntu), as well as in SuSE. When I come along with source file, i don't know what to un-install once i make file. Thank alot.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.