Ubuntu – ‘apt-get install’ Ignoring Specific Package Version

aptdebiandpkgUbuntu

I'd like to install particular version of libstd++6 with following command:

# apt-get install libstdc++6=4.9.0-8  -V
Reading package lists... Done
Building dependency tree       
Reading state information... Done

The following extra packages will be installed:
   libstdc++6 (4.8.2-16)
0 upgraded, 0 newly installed, 0 to remove and 216 not upgraded.

It gives no error, but apt keeps version that was already installed.
And also it refers to this package as "extra".

There's no apt preferences set in /etc/apt/preferences.d.
And the desirable version is definetely available through our local mirror.
(If I try to run "apt-get download libstdc++6=4.9.0-8" it will download exactly desirable version.)

System info:

# cat /etc/issue.net
"Debian GNU/Linux jessie/sid"
# uname -a
Linux www27 3.13-1-amd64 #1 SMP Debian 3.13.7-1 (2014-03-25) x86_64 GNU/Linux.
# dpkg -l |egrep -i "apt|dpkg"
ii  apt                                   0.9.16.1                     amd64        commandline package manager
ii  dpkg                                  1.17.6                       amd64        Debian package management system

Any suggestions?

Best Answer

So it turned out that libstd++6_4.9.0-8 depends on gcc-4.9-base (= 4.9.0-8). However I got installed gcc-4.9-base of version 4.9.0-7.

I figured it out after I tried to install previously downloaded package with dpkg.

# apt-get download libstdc++6=4.9.0-8
# dpkg -i libstdc++6_4.9.0-8_amd64.deb
(Reading database ... 64836 files and directories currently installed.)
Preparing to unpack libstdc++6_4.9.0-8_amd64.deb ...
Unpacking libstdc++6:amd64 (4.9.0-8) over (4.8.2-16) ...
dpkg: dependency problems prevent configuration of libstdc++6:amd64:
 libstdc++6:amd64 depends on gcc-4.9-base (= 4.9.0-8); however:
  Version of gcc-4.9-base:amd64 on system is 4.9.0-7.

dpkg: error processing package libstdc++6:amd64 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 libstdc++6:amd64

Does anyone know how to debug apt or make it's output more verbose?(I want to know it for the future)

Related Question