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
LVL 1
YashyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JohnBusiness Consultant (Owner)Commented:
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.
YashyAuthor Commented:
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.
JohnBusiness Consultant (Owner)Commented:
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.
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

JohnBusiness Consultant (Owner)Commented:
Here is a very reasonable guide on packages, package management and dependencies. It is worth reading for a more complete explanation.

https://www.linode.com/docs/tools-reference/linux-package-management

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
savoneCommented:
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.
YashyAuthor Commented:
Thanks for helping John.
YashyAuthor Commented:
Savone, I literally just saw your message after I awarded the points. I'd love to have given you some points too.
rindiCommented:
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.
JohnBusiness Consultant (Owner)Commented:
@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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.