LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   Debian insists of installing old versions during a dist-upgrade and fails (https://www.linuxquestions.org/questions/debian-26/debian-insists-of-installing-old-versions-during-a-dist-upgrade-and-fails-4175542077/)

jlinkels 05-09-2015 11:34 AM

Debian insists of installing old versions during a dist-upgrade and fails
 
I am trying to perform a dist-upgrade from Wheezy to Jessie. This fails due to dependency problems.

Apt insists of installing old packages, and then runs into dependency problems.

But when I manually install such a package with dpkg, this package installs fine.

I have the idea that if I am able to tell Apt to install the latest packages my dependency problems will disappear.

There is a whole list of dependecy errors for each package which I want to install, but take for example libcairo2:

Code:

You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libgcrypt20 : Depends: libgpg-error0 (>= 1.14) but 1.10-3.1 is installed
<snip>
libwebkitgtk-1.0-0 : Depends: libcairo2 (>= 1.12.16-4~) but 1.12.2-3 is installed
<snip>
E: Unmet dependencies. Try using -f.

So libwebkitgt-1.0-0 depends on libcairo2 > 1.12. Let's install libcairo2:
Code:

jlinkels-lt:/home/jlinkels# apt-get install libcairo2
Reading package lists... Done
Building dependency tree     
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libcairo2-dev : Depends: libcairo2 (= 1.12.2-3) but 1.14.0-2.1 is to be installed
<snip>

So there is a problem with libcairo2-dev. Let's try install that one:
Code:

jlinkels-lt:/home/jlinkels# apt-get install libcairo2-dev
<snip>
The following packages have unmet dependencies:
libcairo2-dev : Depends: libcairo2 (= 1.14.0-2.1) but 1.12.2-3 is to be installed

Hellooooo... libcairo2 cannot be installed because libcair2-dev cannot be installed because the depency for libcairo2 cannot be satisfied. libcairo2 is too new. And the I can't install libcairo2-dev itself because libcairo2 is too old.
Finally, installing libcairo2 through dpkg is successful:
Code:

jlinkels-lt:/home/jlinkels# dpkg -i /var/cache/apt/archives/libcairo2
libcairo2_1.12.2-3_amd64.deb        libcairo2_1.14.0-2.1_amd64.deb      libcairo2-dev_1.12.2-3_amd64.deb    libcairo2-dev_1.14.0-2.1_amd64.deb
jlinkels-lt:/home/jlinkels# dpkg -i /var/cache/apt/archives/libcairo2_1.14.0-2.1_amd64.deb
(Reading database ... 238029 files and directories currently installed.)
Preparing to replace libcairo2 1.12.2-3 (using .../libcairo2_1.14.0-2.1_amd64.deb) ...
Unpacking replacement libcairo2 ...
Setting up libcairo2 (1.14.0-2.1) ...
Processing triggers for libc-bin ...
jlinkels-lt:/home/jlinkels#

Trying to install libcairo2-dev in this way fails on yet another dependency problem.

However, when I traverse the complete dependency chain, installing each dependency with dpkg I succeed. But that is the task of apt-get to solve this isn't it? Why doesn't apt get this?

Is there a magic apt command to tell: "install the newest package available for this version.

This is the contents of all files in apt.conf.d:
Code:

jlinkels-lt:/etc/apt# cat apt.conf.d/*
APT::Authentication::TrustCDROM "true";
APT
{
  NeverAutoRemove
  {
        "^firmware-linux.*";
        "^linux-firmware$";
        "^linux-image.*";
        "^kfreebsd-image.*";
        "^linux-restricted-modules.*";
        "^linux-ubuntu-modules-.*";
        "^gnumach$";
        "^gnumach-image.*";
  };

  Never-MarkAuto-Sections
  {
        "metapackages";
        "restricted/metapackages";
        "universe/metapackages";
        "multiverse/metapackages";
        "oldlibs";
        "restricted/oldlibs";
        "universe/oldlibs";
        "multiverse/oldlibs";
  };
};
APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "0";
APT::Periodic::AutocleanInterval "0";
APT::Update::Post-Invoke {"touch /var/lib/apt/periodic/update-success-stamp 2>/dev/null || true";};
APT::Archives::MaxAge "30";
APT::Archives::MinAge "2";
APT::Archives::MaxSize "500";
// Pre-configure all packages with debconf before they are installed.
// If you don't like it, comment it out.
DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";};
DPkg::Post-Invoke {"if [ -d /var/lib/update-notifier ]; then touch /var/lib/update-notifier/dpkg-run-stamp; fi; if [ -e /var/lib/update-notifier/updates-available ]; then echo > /var/lib/update-notifier/updates-available; fi "; };

jlinkels

jlinkels 05-09-2015 09:57 PM

Well, not all packages eventually install. Some won't install because of a conflict. And a forced install of those leave a lot of other unsatisfied dependencies.

I think I am apt to do a reinstall to clean out the mess. Pun intended.

jlinkels

descendant_command 05-09-2015 10:09 PM

What is in your sources.list?
And why do you have buntu-specific stuff in your apt.conf?

Timothy Miller 05-10-2015 02:11 AM

Also do you have any files in /etc/apt/sources.list.d, and if so, what is in them?

jlinkels 05-10-2015 09:01 AM

Quote:

Originally Posted by descendant_command (Post 5360252)
What is in your sources.list?
And why do you have buntu-specific stuff in your apt.conf?

sources.list contains only this non-commented line:
Code:

deb http://http.us.debian.org/debian/ stable main contrib non-free
I don't know where that that Ubuntu stuff comes from. Usually I don't want to use the words Ubuntu and my laptop in the same sentence. The file which contains this is apt.conf.d/01autoremove, dated Oct 17, 2014. I did not ever point an Ubuntu source anywhere.

jlinkels

jlinkels 05-10-2015 09:02 AM

Quote:

Originally Posted by Timothy Miller (Post 5360286)
Also do you have any files in /etc/apt/sources.list.d, and if so, what is in them?

Code:

-rw-r--r-- 1 root root 176 May 14  2013 google-chrome.list
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb http://dl.google.com/linux/chrome/deb/ stable main

jlinkels

Head_on_a_Stick 05-10-2015 09:37 AM

@OP: Try replacing "stable" with "jessie"; it shouldn't make a difference but it doesn't hurt to try (and will save you some troubles in ~2 years time).

Also, please post the output of:
Code:

apt-cache policy
You can use this to specify the repository:
Code:

# apt-get install -t jessie <package>
EDIT: Do you have a file at /etc/apt/preferences?

If so, post the content here plz.

jlinkels 05-10-2015 10:22 AM

Quote:

Originally Posted by Head_on_a_Stick (Post 5360382)
@OP: Try replacing "stable" with "jessie"; it shouldn't make a difference but it doesn't hurt to try (and will save you some troubles in ~2 years time).

I did. It doesn't make a difference.
Quote:

Originally Posted by Head_on_a_Stick (Post 5360382)
Also, please post the output of:
Code:

apt-cache policy

Code:

jlinkels@jlinkels-lt:/etc/apt$ apt-cache policy
Package files:
 100 /var/lib/dpkg/status
    release a=now
 500 http://dl.google.com/linux/chrome/deb/ stable/main amd64 Packages
    release v=1.0,o=Google, Inc.,a=stable,n=stable,l=Google,c=main
    origin dl.google.com
 500 http://http.us.debian.org/debian/ stable/non-free Translation-en
 500 http://http.us.debian.org/debian/ stable/main Translation-en
 500 http://http.us.debian.org/debian/ stable/contrib Translation-en
 500 http://http.us.debian.org/debian/ stable/non-free amd64 Packages
    release v=8.0,o=Debian,a=stable,n=jessie,l=Debian,c=non-free
    origin http.us.debian.org
 500 http://http.us.debian.org/debian/ stable/contrib amd64 Packages
    release v=8.0,o=Debian,a=stable,n=jessie,l=Debian,c=contrib
    origin http.us.debian.org
 500 http://http.us.debian.org/debian/ stable/main amd64 Packages
    release v=8.0,o=Debian,a=stable,n=jessie,l=Debian,c=main
    origin http.us.debian.org
Pinned packages:
jlinkels@jlinkels-lt:/etc/apt$ ^C

Quote:

Originally Posted by Head_on_a_Stick (Post 5360382)
You can use this to specify the repository:
Code:

# apt-get install -t jessie <package>

That doesn't make a difference.

What I don't understand is that for a lot of packages 2 versions are available:
Code:

jlinkels@jlinkels-lt:/etc/apt$ apt-cache showpkg libglib2.0-dev
Package: libglib2.0-dev
Versions:
2.42.1-1 (/var/lib/apt/lists/http.us.debian.org_debian_dists_stable_main_binary-amd64_Packages)
 Description Language:
                File: /var/lib/apt/lists/http.us.debian.org_debian_dists_stable_main_binary-amd64_Packages
                  MD5: f1a310bc28a3b8566d2f79a4116e8a0e
 Description Language: en
                File: /var/lib/apt/lists/http.us.debian.org_debian_dists_stable_main_i18n_Translation-en
                  MD5: f1a310bc28a3b8566d2f79a4116e8a0e

2.33.12+really2.32.4-5 (/var/lib/dpkg/status)
 Description Language:
                File: /var/lib/apt/lists/http.us.debian.org_debian_dists_stable_main_binary-amd64_Packages
                  MD5: f1a310bc28a3b8566d2f79a4116e8a0e
 Description Language: en
                File: /var/lib/apt/lists/http.us.debian.org_debian_dists_stable_main_i18n_Translation-en
                  MD5: f1a310bc28a3b8566d2f79a4116e8a0e

Debian should install the latest version by default. And I have no idea how 2.33.12+really2.32.4-5 comes here. That looks like a development version and AFAICR I never did any mixing on this machine.

Quote:

Originally Posted by Head_on_a_Stick (Post 5360382)
EDIT: Do you have a file at /etc/apt/preferences?

No file named preferences and /etc/apt/preferences.d is empty

jlinkels

Head_on_a_Stick 05-10-2015 10:50 AM

Just to be absolutely sure, did you use this before `apt-get dist-upgrade`:
Code:

# apt-get update
I'm sure you did (looking at the `apt-cache policy` output), but it doesn't hurt to check.

Funnily enough, I too have apparently *buntu-related lines in /etc/apt/apt.conf.d/01autoremove in my sid system and I've never touched that directory...

Hungry ghost 05-10-2015 11:06 AM

Quote:

Originally Posted by jlinkels (Post 5360392)
Debian should install the latest version by default. And I have no idea how 2.33.12+really2.32.4-5 comes here. That looks like a development version and AFAICR I never did any mixing on this machine.

I don't know either, but FWIW, version 2.33.12+really2.32.4-5 belongs to oldstable (Wheezy). Anyway, it has just occurred to me, have you upgraded apt to Jessie's latest version? Maybe for some reason apt is still stuck in Wheezy, even though you edited your sources.list to point to Jessie/Stable.

EDDY1 05-10-2015 03:21 PM

Have you done apt-get clean to remove the old-stable sources?
Can you post your sources.list?

jlinkels 05-10-2015 04:00 PM

Quote:

Originally Posted by odiseo77 (Post 5360411)
I don't know either, but FWIW, version 2.33.12+really2.32.4-5 belongs to oldstable (Wheezy). Anyway, it has just occurred to me, have you upgraded apt to Jessie's latest version? Maybe for some reason apt is still stuck in Wheezy, even though you edited your sources.list to point to Jessie/Stable.

I did not explicitley update apt, but it is a suggestion. Will do.

jlinkels

jlinkels 05-10-2015 04:02 PM

Quote:

Originally Posted by EDDY1 (Post 5360505)
Have you done apt-get clean to remove the old-stable sources?
Can you post your sources.list?

I did not apt-get clean as this only cleans the archives directory. AFAIK this is completely independent of what apt wants to install. If a package is there it is installed, if it is not, it is downloaded.

But can I clean or forcefully renew the list apt-get update produces?

sources.list contains only this non-commented line:
Code:

deb http://http.us.debian.org/debian/ stable main contrib non-free
I used to use the apt-cacher-ng on a local server, but as soon as these problems occurred I switched to a live repository.

jlinkels

Daws 05-10-2015 04:47 PM

Not sure what's going on here, but I can answer this

Quote:

What I don't understand is that for a lot of packages 2 versions are available:
It's pretty simple, the two versions of the package apt knows about are the version currently installed and the newer version available in the repositories.

Re. your problem, if I had to guess I would say it was Chrome or another third party package keeping some of the old packages in place. The debian upgrade manual

https://www.debian.org/releases/stab...rading.en.html

will tell you to remove all these packages or fiddle with their sources.list entries (might be worth changing the chrome sources.list entry to point to testing temporarily and see if that makes a difference)

EDDY1 05-10-2015 06:06 PM

Just simply comment them out would work.


All times are GMT -5. The time now is 07:29 PM.