Link to home
Start Free TrialLog in
Avatar of Yashy
YashyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Linux basics - what is the difference in installing with package manager rather than from source. And what does it all mean?

hi guys,

what is the difference in installing a Linux application package manager rather than from source. Would you be able to explain it to me simply so I can understand it propertly:).

Thank you
Yashy
Avatar of John
John
Flag of Canada image

A Linux Application Manager packages all the files and compiled modules need for install in one convenient package. It is usually easier that compiling individual source files into a package. The end result is usually the same. I prefer packages if available.
Avatar of Yashy

ASKER

Thank you John.

Could you explain that a bit more? I work with Windows server environment. When I install a package it's just an executable, .exe or .msi. I run it. Done. With Linux, I hear of compiling a package from source etc. I don't get why/what that means and why the system does it? What is compiling a package?

As an example, if you have an application why can't we just install the application..nice and simple. Instead, there is the ability to compile the modules. What is the module? Is it a part of the application which you can include/exclude? Is it similar to Windows where you can customise your installation and exclude some things and not others?

I hope what I am asking makes sense. Thank you again for your advice.
Linux does not have a registry, so all the files that are needed to work with the compiled program are included with the package.

I only have compiled kernel changes for VMware Tools in Linux (and only a long while back) so on the occasions I use a Linux Virtual Machine, I just run the package manager as it is vastly easier.
ASKER CERTIFIED SOLUTION
Avatar of John
John
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Steven Vona
To understand deeper about installing from source, you need to know what source is.  

Some programming languages are written in a certain code that needs to be compiled in order for the system to understand it.  When you install from source, you have to "source code" in an un-compiled state.  Then you compile and install it.

The advantage of this is you are able to change the source code to make the program do something you want it to do. You can install it on different operating systems from the same source code, or tailor the install to your needs.

The disadvantage is you need to be a little more versed in the OS of your choice as well as in using different compilers. You also need to know what other programs and or libraries the program is dependent on.

When you use a package manager, the "package" is that source code already compiled for a particular system.  For example Ubuntu uses apt-get and Red Hat uses yum, or more recently dnf.

The package manager has the ability to install not only the program you are asking for, but all of it's dependencies as well.  In windows, you need DLL files and such for a program to run.  In Linux you need similar things call simply libraries.  The package manager takes care of all of this for you, which makes it much easier, efficient and less problem prone to install different applications.
Avatar of Yashy

ASKER

Thanks for helping John.
Avatar of Yashy

ASKER

Savone, I literally just saw your message after I awarded the points. I'd love to have given you some points too.
Via package manager has the big advantage that you get the program that was prepared for your particular OS, with all the adaptations, so it will work optimally for your distro directly from the distro's repositories. It also ensures that the proper and required dependencies are also downloaded and installed. Besides that, patches and updates are also automatically delivered for that program when your run updates. If you compile from source, updates aren't delivered, and you will have to download the updates and recompile the package yourself. Needless to say that your system will probably never be properly updated or patched, and that makes it more open to attack.

Generally using the package manager is a lot simpler than for example when you install something in Windows. You don't first have to find the software on a webpage, download the correct version for your version of Windows, then install. You rather just select it directly within the package manager, and it gets downloaded and installed in one go.

Gentoo is a little different, as that distro downloads and compiles the package sources directly via it's package manager every time you install some software via it. This takes a lot of time.
@Yashy - You are very welcome and I was happy to help. Linux is MUCH different than Windows and that is one reason I like the package managers. I tried Gentoo once and gave up for its utter complexity.