Install recommended packages to avoid problems

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
User avatar
xenopeek
Level 24
Level 24
Posts: 20360
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Install recommended packages to avoid problems

Postby xenopeek » Thu Dec 25, 2014 4:38 pm

Many a user here on the forum can be found having trouble with installing programs on Linux Mint, because recommended packages are not automatically installed. Ubuntu on the other hand automatically installs recommended packages. Using a guide or tutorial for Ubuntu will thus not give you the desired outcome. Sometimes it may be just that some add-ons for the program aren't installed, limiting functionality but leaving the program otherwise working. However, I've helped quite a lot of people both here and on IRC that were left with completely non-functioning programs because recommended packages weren't installed.

If you don't mind using a few extra megabytes when installing a program (both in download and in hard disk usage) you can change the default behavior back to how Ubuntu handles this--automatically installing recommended packages when installing a program, giving you the best experience with the program with all its add-ons installed.

To change it back you just need to remove the file /etc/apt/apt.conf.d/00recommends and /etc/apt/apt.conf.d/99synaptic, or comment out the two configuration lines found in those files. To delete the files run this command from a terminal:

Code: Select all

sudo rm -v /etc/apt/apt.conf.d/00recommends /etc/apt/apt.conf.d/99synaptic

Or you can follow Laurent85's post viewtopic.php?f=42&t=185770#p1135161 to change the setting using Synaptic.

Alternatively, when installing a program you can instruct to install the recommended packages just for this install. To install a program that way run this command on the terminal, replacing "program" with the (lowercase) name of the program you want to install:

Code: Select all

sudo apt-get install --install-recommends program

Again, this is the default on Ubuntu and to my mind when you have a hard disk of hundreds of gigabytes and a fast Internet connection it really doesn't make sense to not install the recommended packages that give your program more functionality. One day you'll find yourself here back on the forum with a non-function just installed program, with me telling you to install the recommended packages to fix it :wink:
Last edited by xenopeek on Sat Feb 20, 2016 7:10 am, edited 2 times in total.
Reason: updated to cover synaptic
Image

User avatar
jimallyn
Level 14
Level 14
Posts: 5111
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: Install recommended packages to avoid problems

Postby jimallyn » Thu Dec 25, 2014 4:50 pm

I think you can get the same functionality in Synaptic by clicking Settings, Preferences, General, and checking the box for "Consider recommended packages as dependencies."
Image

“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan

User avatar
ktheking
Level 4
Level 4
Posts: 430
Joined: Tue May 13, 2014 9:13 am

Re: Install recommended packages to avoid problems

Postby ktheking » Thu Dec 25, 2014 4:55 pm

Just wondering , isn't that undoing the efforts that Clem put into it :lol: ?

User avatar
xenopeek
Level 24
Level 24
Posts: 20360
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Install recommended packages to avoid problems

Postby xenopeek » Fri Dec 26, 2014 3:24 am

I don't know the exact reason for this change, but I do see the fallout of it in problems users are having on the forums. Considering also that it by default gives you a program with less functionality, I think it's better to stick to the upstream default of always installing recommended packages.
Image

User avatar
panorain
Level 4
Level 4
Posts: 275
Joined: Mon Dec 16, 2013 3:21 pm

Re: Install recommended packages to avoid problems

Postby panorain » Wed Dec 31, 2014 9:50 am

I like the 'Lean N mean' approach myself. I think Clem has been doing something right.

By the way I really enjoy the 'MATE' desktop.

:D
Linux Mint 17 Qiana
Linux Mint 13 Maya
Ubuntu 10.04
Always =updatedb=
GNU LINUX

User avatar
Pjotr
Level 17
Level 17
Posts: 7528
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Install recommended packages to avoid problems

Postby Pjotr » Fri Jul 03, 2015 5:19 pm

@xenopeek: I propose this improvement:

Code: Select all

sudo mv -v /etc/apt/apt.conf.d/00recommends /

... this has as main advantage, that it's easy to undo, because the settings file is not deleted but only moved to the root folder (from which it can be put back, if so desired). Plus the -v variable tells the user, what has happened.

What do you think?
Tip: 10 things to do after installing Linux Mint 18.1 Serena
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

User avatar
xenopeek
Level 24
Level 24
Posts: 20360
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Install recommended packages to avoid problems

Postby xenopeek » Fri Jul 03, 2015 5:41 pm

Added the -v switch (I have that as a default alias on all commands that support it, hence I never type it :wink:).

Looked into Dir::Ignore-Files-Silently setting. Default configuration ("apt-config dump" to see it; "man apt.conf" to read about the settings) ignores files with extension .disabled. So the better approach, if you want to be able to switch back, is to use:

Code: Select all

sudo mv -v /etc/apt/apt.conf.d/00recommends /etc/apt/apt.conf.d/00recommends.disabled
Image

User avatar
Pjotr
Level 17
Level 17
Posts: 7528
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: Install recommended packages to avoid problems

Postby Pjotr » Fri Jul 03, 2015 5:46 pm

That looks even better. :)

I can't imagine why Mint is deviating from the Ubuntu way, on this issue. Are there any other reasons than saving a few MB's of disk space?

Could you perhaps contact the devs about this?
Tip: 10 things to do after installing Linux Mint 18.1 Serena
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

threadbane
Level 1
Level 1
Posts: 3
Joined: Tue Jul 21, 2015 5:00 pm

Re: Install recommended packages to avoid problems

Postby threadbane » Wed Jul 22, 2015 9:15 am

xenopeek wrote:Many a user here on the forum can be found having trouble with installing programs on Linux Mint, because recommended packages are not automatically installed. Ubuntu on the other hand automatically installs recommended packages. Using a guide or tutorial for Ubuntu will thus not give you the desired outcome. Sometimes it may be just that some add-ons for the program aren't installed, limiting functionality but leaving the program otherwise working. However, I've helped quite a lot of people both here and on IRC that were left with completely non-functioning programs because recommended packages weren't installed.
...
One day you'll find yourself here back on the forum with a non-function just installed program, with me telling you to install the recommended packages to fix it :wink:


First, thanks for all the welcomes!

Second, this sounds like the answer! I'll get around to giving this a go sometime soon! Muchas gracias!! (Golf season ...)

User avatar
jimallyn
Level 14
Level 14
Posts: 5111
Joined: Thu Jun 05, 2014 7:34 pm
Location: Wenatchee, WA USA

Re: Install recommended packages to avoid problems

Postby jimallyn » Sat Sep 12, 2015 3:04 pm

xenopeek, is there a way we can install the recommended packages, after the fact, for everything we have already installed?
Image

“If the government were coming for your TVs and cars, then you'd be upset. But, as it is, they're only coming for your sons.” - Daniel Berrigan

User avatar
xenopeek
Level 24
Level 24
Posts: 20360
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Install recommended packages to avoid problems

Postby xenopeek » Sat Sep 12, 2015 3:14 pm

I don't think that's trivial to do fully automatically. But assuming you know which packages you installed that you want to install recommended packages for, or you can fish them out of this list:

Code: Select all

grep ' install ' /var/log/dpkg.log

Then you could query with the command "apt-cache depends packagename" what their recommended packages are and install those yourself or use the command "sudo apt-get install --install-recommends packagename" to reinstall the package along with installing recommended packages.

If you're not confused by programs you installed not work, perhaps don't bother with it. Obvious ones I've seen recently have been installing VirtualBox doesn't install the recommended graphical user interface so you can only it from the terminal. Another one was if for some reason you have trouble with VLC and remove it and then reinstall it, it doesn't install plugins to use PulseAudio for output. I don't think I've managed to get through to the developers that it's a silly thing to do, not installing recommended packages,
Image

effected
Level 1
Level 1
Posts: 8
Joined: Thu Oct 15, 2015 5:17 am

Re: Install recommended packages to avoid problems

Postby effected » Thu Oct 15, 2015 7:45 pm

Hello,
I just tried to get the recommended packages to work on my system.
Running Linux Mint 17.2 AMD 64 bit cinnamon
I used the "sudo mv -v /etc/apt/apt.conf.d/00recommends /etc/apt/apt.conf.d/00recommends.disabled" in a terminal,then rebooted,then checked the application I wanted to install with ""apt-cache depends packagename".To see what the recommended software was.

I then used the software manager to install the application,and it did not install any of the recommended software.

Specifically I am working on getting KDEnlive installed.(not that recommended packages actually made it work,but I still have other things to try)

Since that didnt work I used "sudo apt-get install --install-recommends program" and that worked.

I am just wondering why renaming the 00recommends file did not work.I have gone into the directory and the file is renamed to 00recommends.disabled
Did I do something wrong or miss a step?Is there is another way to make the software manager use recommended packages in the future?

Thanks.

User avatar
xenopeek
Level 24
Level 24
Posts: 20360
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Install recommended packages to avoid problems

Postby xenopeek » Fri Oct 16, 2015 1:35 am

Possibly the problem is with it being a KDE application? See near the end of the release notes the bit about issues with KDE applications: http://www.linuxmint.com/rel_rafaela_cinnamon.php
Image

altair4
Level 18
Level 18
Posts: 8348
Joined: Tue Feb 03, 2009 10:27 am

Re: Install recommended packages to avoid problems

Postby altair4 » Fri Feb 19, 2016 12:34 pm

I have a procedural question.

So if I run the following on say Mint 17.3 Cinnamon:

Code: Select all

grep "APT::Install-Recommends" /etc/apt/apt.conf.d/*

I get the following result:
/etc/apt/apt.conf.d/00recommends:APT::Install-Recommends "false";
/etc/apt/apt.conf.d/99synaptic:APT::Install-Recommends "false";

The 99synaptic version comes from Ubuntu --- except there it's set to "true"

If by following your recommendation 00recommends is disabled or removed isn't 99synaptic still engaged?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
xenopeek
Level 24
Level 24
Posts: 20360
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Install recommended packages to avoid problems

Postby xenopeek » Fri Feb 19, 2016 2:45 pm

If it is set to true that would be fine; in your output it is set to false?

I don't have that file here:

Code: Select all

$ grep "APT::Install-Recommends" /etc/apt/apt.conf.d/*
/etc/apt/apt.conf.d/00recommends:APT::Install-Recommends "false"
$
Image

altair4
Level 18
Level 18
Posts: 8348
Joined: Tue Feb 03, 2009 10:27 am

Re: Install recommended packages to avoid problems

Postby altair4 » Fri Feb 19, 2016 3:24 pm

Interesting.

I have installed every version of Mint17.3:

In Cinnamon and MATE both of these files exist by default:

00recommends
99synaptic

Both are set to have recommends as false so your original HowTo would fix one of them but not both.

Only in XFCE does there exist only the 00recommends file.

All of these were installed from the iso and not upgraded from earlier Mint versions.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
Laurent85
Level 12
Level 12
Posts: 4159
Joined: Tue May 26, 2015 10:11 am
Location: Vendée, France

Re: Install recommended packages to avoid problems

Postby Laurent85 » Fri Feb 19, 2016 3:59 pm

Actually if a user launch Synaptic the program will create its system wide /etc/apt/apt.conf.d/99synaptic file setting with APT::Install-Recommends set to false, overriding 00recommends setting. So whatever 00recommends setting value or file removed, 99synaptic will prevail, this might confuse a user enable to figure out why the tutorial fails to properly install recommended packages with 00recommends removed.
Image
Au printemps tu verras je serai de retour,
Le printemps c'est joli pour se parler d'amour,
Nous irons voir ensemble les jardins refleuris,
Et déambulerons dans les rues de Paris.

altair4
Level 18
Level 18
Posts: 8348
Joined: Tue Feb 03, 2009 10:27 am

Re: Install recommended packages to avoid problems

Postby altair4 » Fri Feb 19, 2016 4:06 pm

Laurent85 wrote:Actually if a user launch Synaptic the program will create its system wide /etc/apt/apt.conf.d/99synaptic file setting with APT::Install-Recommends set to false, overriding 00recommends setting. So whatever 00recommends setting value or file removed, 99synaptic will prevail, this might confuse a user enable to figure out why the tutorial fails to properly install recommended packages with 00recommends removed.

That's the key!!!

I was wondering why my Cinnamon and MATE installs had both but my XFCE did not. I never ran synaptic on the XFCE install. Now that I did you are correct. I now have both files on all versions of Mint 17.3 and agree with your conclusion that fixing one doesn't fix both.

EDIT: By the way doing something like this doesn't work:

Code: Select all

sudo mv -v /etc/apt/apt.conf.d/99synaptic /etc/apt/apt.conf.d/99synaptic.disabled

The next time synaptic in invoked it recreates it and sets it to false. What does seem to work is actually editing 99synaptic and changing "false" to "true"
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
xenopeek
Level 24
Level 24
Posts: 20360
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Install recommended packages to avoid problems

Postby xenopeek » Sat Feb 20, 2016 4:51 am

I've updated the original post. Some testing shows Synaptic copies the setting from /etc/apt/apt.conf.d/00recommends to /etc/apt/apt.conf.d/99synaptic. If /etc/apt/apt.conf.d/00recommends doesn't exist it will write the default value to /etc/apt/apt.conf.d/99synaptic, which is to install recommended packages. So as long as you delete both of these files, or comment out the "APT::Install-Recommends" line in both, or edit them from value "false" to "true", you're all good and Synaptic won't mess things up.

Goes to show, I never use Synaptic on my installs.
Image

User avatar
Laurent85
Level 12
Level 12
Posts: 4159
Joined: Tue May 26, 2015 10:11 am
Location: Vendée, France

Re: Install recommended packages to avoid problems

Postby Laurent85 » Sat Feb 20, 2016 6:55 am

I would also suggest this graphical user interface tutorial:

Launch Synaptic > Settings > General tab > tick Consider recommended packages as dependencies > Apply

The Synaptic setting will prevail over Mint setting, Synaptic acting as a system wide toggle switch.
Image
Au printemps tu verras je serai de retour,
Le printemps c'est joli pour se parler d'amour,
Nous irons voir ensemble les jardins refleuris,
Et déambulerons dans les rues de Paris.


Return to “Tutorials”

Who is online

Users browsing this forum: wilbobob and 3 guests