LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-28-2013, 05:49 AM   #1
keldar89
LQ Newbie
 
Registered: Aug 2013
Posts: 2

Rep: Reputation: Disabled
Better to install something using source, or package manager


Hi there,

I have a very brief question which has always bugged me on Linux; is it better to install new software via the source (usually downloaded via the website), or from the system's package manager (I use Lubuntu - so apt-get).

The reason I ask this, is because the package manager does not always have the most up-to-date version of some software (I tend to find Java/NetBeans can drop behind a version or two quite quickly). And so sometimes I will install it from source which can be quite nitpicky.

However, it just doesn't feel right when I install from source, I'm guessing because it isn't centrally and automatically managed by the package manager. If I install it via the package manager, then at least that way I can easily remove it and have more control.

So, might be a silly question in the eyes of some, but is there a right/wrong way for this? Surely the package manager is there to be used, but why is it not always up-to-date? Is one preferred over the other and if so, then why?

Thanks.
 
Old 08-28-2013, 06:01 AM   #2
yilez
Member
 
Registered: Apr 2004
Distribution: Slackware
Posts: 127

Rep: Reputation: Disabled
If you don't use the package manager, it can sometimes become confused. Lets say you install java from Oracle's website and not from the package manager, then apt-get something that depends on java, it will probably download and install your distro's java anyway.

It is possible to make your own packages, but I find this more work than I want to spend. There are also other repositories out there that might contain more up to date versions of packages than your distro provides.

In my mind, I always use the package manager (if it exists) as it tends to avoid hassle later one. If I absolutely NEED a more up to date version, I tend to install it in a different location. Like /opt or a /home/yilez/local directory, so it doesn't interfere with the rest of my system.

95% of the time, the old versions of the package are fine anyway, so I rarely update.
 
Old 08-28-2013, 06:04 AM   #3
Razaliel
LQ Newbie
 
Registered: Jul 2013
Distribution: Debian testing
Posts: 21

Rep: Reputation: 5
Hi,

Install from the package manager is better because it automatically resolve dependencies which is not made by compiling the source. Sometimes the dependencies can be huge and you will not be able to resolve them by yourself. The package manager installs the software versions which are available in the repositories in /etc/apt/sources.list. They are not always up-to-date because some newer versions may not work with the current distribution version because it requirs unavailable newer dependencies and some other reasons.

If you want a distribution up-to-date, you can change to a rolling release like Debian sid or Arch Linux but these require a certain amount of skill because you might need to configure some things by hand and deal with bugs and unstability.
 
1 members found this post helpful.
Old 08-28-2013, 06:10 AM   #4
yilez
Member
 
Registered: Apr 2004
Distribution: Slackware
Posts: 127

Rep: Reputation: Disabled
Razaliel adds some more points with dependencies and rolling release distributions. A few more user friendly rolling release distributions:

Mageia Cauldron
Fedora Rawhide
OpenSuse Tumbleweed

I tend to not like rolling release distributions. I have run both Gentoo and Arch in the past and while they are both fantastic, I like my packages to stay as they are when they are installed.
 
Old 08-28-2013, 06:16 AM   #5
keldar89
LQ Newbie
 
Registered: Aug 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Razaliel View Post
Hi,

Install from the package manager is better because it automatically resolve dependencies which is not made by compiling the source. Sometimes the dependencies can be huge and you will not be able to resolve them by yourself. The package manager installs the software versions which are available in the repositories in /etc/apt/sources.list. They are not always up-to-date because some newer versions may not work with the current distribution version because it requirs unavailable newer dependencies and some other reasons.

If you want a distribution up-to-date, you can change to a rolling release like Debian sid or Arch Linux but these require a certain amount of skill because you might need to configure some things by hand and deal with bugs and unstability.
Awesome! Thanks all.

That was going to be my next question - by the looks of it, it seems that the package manager is the way to go. I'm setting up a new Linux VM and tried installing the JDK via the Java website which turned out to be horrendously difficult - so installed OpenJDK instead.

If a piece of software is out-of-date on the package manager, then is that something that has to be lived with? When does it get updated, and who by (and how regularly)?

Slowly getting to grips with Linux in comparison to Windows .
 
Old 08-28-2013, 06:36 AM   #6
Razaliel
LQ Newbie
 
Registered: Jul 2013
Distribution: Debian testing
Posts: 21

Rep: Reputation: 5
Well, softwares are constantly "out-of-date" because the software developers always improve their product, but the old versions available in the Ubuntu repositories are still working well. When a version of Ubuntu is released, it has the software versions which were tested and approved by teams working for Debian and Ubuntu. For Ubuntu, a new version is available every 6 months and new software versions come with it. You can still install new versions of software via source like you did or via PPA.
 
Old 08-28-2013, 06:39 AM   #7
yilez
Member
 
Registered: Apr 2004
Distribution: Slackware
Posts: 127

Rep: Reputation: Disabled
Software tends to get fixed, but not updated. If your distro ships with python 2.6, you will only ever see python 2.6 on there. If you want 2.7 or 3.x, you will need to install a newer version of your distro.

there are 2 ways to look at this:

I install a long-term stable distribution. I can install any software from the repository and have a good idea that it will work. If it doesn't, it will get updates providing bugs are reported. On the downside, my distro might ship with Gimp 2.6. I want features from 2.8. This means looking for a package, making my own package, or installing from source, possibly affecting the rest of the system.

As a side note, I believe that MacOS gets around a lot of these issues by bundling dependencies into a package. Lets say a MacOS application requires SDL 2.0.0. Instead of installing SDL 2.0.0 as a system library for all programs to use, it will be in the application folder. This makes sure that your system stays stable, and allows you to use more modern software. It also bloats packages up somewhat. I've seen some Mac packages 3 times larger than the linux equivalent. I may have some of this wrong as I am not a Mac user.
 
Old 08-28-2013, 07:08 AM   #8
Jenni
Member
 
Registered: Oct 2011
Distribution: Slackware, Fedora
Posts: 158

Rep: Reputation: Disabled
If you have a package manager that handles dependencies, you should probably use that. Installing software from source can cause issues with the dependency resolution as mentioned above.
If you don't have dependency resolution issues to deal with (Either by not using your package manager, or using Slackware, or taking steps to avoid it) Then it's really up to you to decide if you need anything special, like setting flags at compile time, or need a more up to date version than the package manager provides. If you don't need anything special like that, using the package manager is much easier and equally effective usually.
 
Old 08-28-2013, 07:18 AM   #9
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
Quote:
If a piece of software is out-of-date on the package manager, then is that something that has to be lived with?
i would say, yes, on critical servers. for installations that are not critical, you can use third-party (i.e. unofficial) repositories that may have newer versions of packages for your distro.

Quote:
When does it get updated, and who by (and how regularly)?
the who is by the distro maintainers. the when depends on the distro and its goals, e.g. whether the distro strives to be cutting-edge or stable. even for fast-moving distros like fedora, new packages first have to go into a testing repository before they're made available to general users.

as an aside, there are two important issues solved by sticking to your distro's packages:

1. the software dependencies: you might install a new version of a package manually, but then run into problems when the package manager tries to bring in the older version as a dependency to something else. the distro maintainers presumably have worked out the dependencies among all the packages.

2. security: if you compile your own software, be prepared to update it when a vulnerability is found. this implies your having to check for vulnerabilities regularly. sometimes, updating is not so easy as installing, but you'd have to read the documentation which comes with the source code to know. it's easier to rely on the distro to keep up with security updates than to handle it yourself.
 
Old 08-28-2013, 04:35 PM   #10
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Linux Mint, Ubuntu
Posts: 1,600

Rep: Reputation: 352Reputation: 352Reputation: 352Reputation: 352
Although I don't recommend it, you may be able to install a later version of a package in the appropriate format from another distro (for example, installing a foreign rpm on a Fedora system). Sometimes it works, but in my experience, it often causes many more problems than it solves. I've also used checkinstall to create an appropriate package from the source code, and then used the package manager to install the newly created package.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Debian 6 install with LXDE but no package manager to install more software onerous Debian 6 07-07-2012 01:23 PM
compile from source vs package manager lostzinzthought Linux - General 5 09-14-2010 08:41 PM
[SOLVED] Build from source or Via Package Manager Greedyh4mster Linux - Newbie 6 08-23-2010 12:36 AM
Package manager/compile from source doowttam Linux - Newbie 3 07-07-2006 02:44 AM
Package Manager stuck on source lhoff Linux - Newbie 0 12-30-2001 07:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration