Web lists-archives.com

Re: apt{-cache,-get,itude} show wrong version of package after update

On Tue, Mar 27, 2018 at 07:50:03PM +0200, Jean-Baptiste Thomas wrote:
> After apt-get update, attempting to install ntp tries to
> download version 1:4.2.8p10+dfsg-3+deb9u1 and fails. It tries
> to download +deb9u1 because
>   $ aptitude show ntp
>   Package: ntp
>   Version: 1:4.2.8p10+dfsg-3+deb9u1
>   State: not installed
>   [...]
> and it fails because the version of the package in the Debian 9
> mirror listed in /etc/apt/sources.list is +deb9u2 :
>   ntp_4.2.8p10+dfsg-3+deb9u2_amd64.deb
> I don't understand what went wrong. apt-get update seemed to go
> well, only complaining about missing "DEP-11 64x64 Icons", which
> are presumably not a vital part of ntp.
> How is this possible ? I'm confused.

I'm not sure if you really did what it sounds like you did here, but if 
you did... you can't mix and match commands to apt-get and aptitude.

You did apt-get update so you need to use apt-get upgrade, or 
dist-upgrade, or whatever the apt-get command is (I don't much use 
apt-get, have switched to the apt command since upgrading to stretch).

If you want to use aptitude upgrade, or dist-upgrade, or safe-upgrade, 
or whatever the command is (embarrassingly I have forgotten, I used 
aptitude for years _before_ upgrading to stretch) you need to first do 
aptitude update.

apt-get update followed by aptitude upgrade will lead to pain.

Hope that helps