Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

why does dist-upgrade to squeeze want to remove apt and how can I fix it?

$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  apt apt-file apt-utils aptitude binutils build-essential debhelper dpkg-dev dselect elinks g++ g++-3.3 g++-4.0 g++-4.1 g++-4.3 gcc
  gcc-3.3 gcc-4.0 gcc-4.1 gcc-4.3 gettext gettext-base groff-base html2text iceweasel imagemagick intltool-debian iperf kernel-package
  libapt-pkg-perl libboost-iostreams1.42.0 libcwidget3 libdatrie0 libdjvulibre21 libept1 libfreebob0 libgc1c2 libglu1-mesa libgomp1
  libgraphviz4 libhunspell-1.2-0 libilmbase6 libmagick10 libopenexr6 libossp-uuid-perl libossp-uuid15 libreadline5 libruby1.8
  libsigc++-1.2-5c2 libsigc++-2.0-0c2a libsoap-lite-perl libstdc++5 libstdc++5-3.3-dev libstdc++6 libstdc++6-4.0-dev libstdc++6-4.1-dev
  libstdc++6-4.3-dev libtorrent10 libvdemgmt0 libwine-gl libxapian15 libxapian22 libxcb-xlib0 libxmlrpc-c3 lzma man-db menu
  mysql-client-5.0 mysql-server-5.0 nessusclient nmap po-debconf pppoeconf python-glade2 python-gtk2 python-numeric python2.3 python2.4
  reportbug rtorrent tasksel tasksel-data tcptrack telnet unrar-nonfree utf8-migration-tool w3m wine xserver-xorg-video-cyrix
  xserver-xorg-video-imstt xserver-xorg-video-nsc xserver-xorg-video-v4l xserver-xorg-video-vga xulrunner-1.9
The following NEW packages will be installed:
  apache2.2-bin autopoint dbus dbus-x11 esound-common etherboot-qemu gdbserver git gnupg-curl insserv install-info isc-dhcp-client
  isc-dhcp-common keyboard-configuration libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libaprutil1-dbd-sqlite3
  libaprutil1-ldap libasyncns0 libaudiofile0 libaudit0 libbind9-60 libbluetooth3 libbsd0 libc-ares2 libc-bin libc-dev-bin libcap2-bin
  libcdt4 libclass-inspector-perl libcupsimage2 libcurl3-gnutls libdatrie1 libdbus-glib-1-2 libdirectfb-1.2-9 libdjvulibre-text libdns69
  libdpkg-perl libdrm-intel1 libdrm-nouveau1 libdrm-radeon1 liberror-perl libesd0 libfile-copy-recursive-perl libflac8 libgcr0 libgp11-0
  libgpgme11 libgraph4 libgssapi-krb5-2 libgvc5 libisc62 libisccc60 libisccfg62 libjbig2dec0 libjpeg8 libk5crypto3 libkrb5-3
  libkrb5support0 liblqr-1-0 libltdl7 liblwres60 liblzma2 libmpfr4 libmysqlclient16 libnfnetlink0 libogg0 libonig2 libopts25 libpathplan4
  libpciaccess0 libpth20 libpulse0 libpython2.6 libqdbm14 libraw1394-11 libreadline6 libsasl2-modules libsmi2ldbl libsndfile1
  libtask-weaken-perl libtest-pod-perl libtokyocabinet8 libtre5 libudev0 libunistring0 libutempter0 libv4l-0 libvde0 libvorbis0a
  libvorbisenc2 libx11-protocol-perl libx11-xcb1 libxcb-atom1 libxcb-aux0 libxcb-dri2-0 libxcb-event1 libxdot4 libxvmc1
  linux-image-2.6.32-5-686 lockfile-progs lynx lynx-cur multiboot openbios-ppc os-prober perl-tk php5-suhosin python2.6 python2.6-minimal
  qemu-keymaps qemu-system qemu-user qemu-utils seabios sensible-utils shared-mime-info tsconf xserver-common xserver-xorg-video-geode
  xserver-xorg-video-nouveau xz-utils
The following packages have been kept back:
  cpp cpp-4.3 gcc-4.3-base grub grub-common libgcc1
The following packages will be upgraded:
  apache2 apache2-mpm-prefork apache2.2-common bash bash-doc bc bind9 bind9-host bind9utils cpio cpp-4.1 cron dash dc debianutils
  dhcp3-client dhcp3-common djvulibre-desktop dnsutils dpkg e2fsprogs ed elinks-data fdutils findutils flex ftp fvwm gcc-4.1-base gconf2
  gconf2-common gdb gksu gnome-keyring gnupg gpgv grep grub-doc grub-legacy-doc info iptables ispell libapache2-mod-auth-plain
  libapache2-mod-php5 libaprutil1 libavc1394-0 libc6 libc6-dev libc6-i686 libcairo2 libcups2 libcurl3 libdbd-mysql-perl libedit2
  libgconf2-4 libgdbm3 libgksu2-0 libgl1-mesa-dri libgl1-mesa-glx libglade2-0 libglib2.0-0 libgnome-keyring0 libgphoto2-2
  libgphoto2-port0 libgsf-1-114 libgtk2.0-0 libgtop2-7 libiec61883-0 libjpeg-progs libkrb53 libmail-box-perl libnss-db liborbit2
  libpango1.0-0 libpq5 librsvg2-2 libsane libsdl1.2debian libsdl1.2debian-alsa libstartup-notification0 libthai-data libthai0 libts-0.0-0
  libwine libwine-alsa libwine-cms libwine-gphoto2 libwine-ldap libwine-print libwine-sane libx11-6 libxcb1 libxi6 libxml2-utils
  linux-image-2.6-686 linux-image-686 locales m4 mtools multiboot-doc mutt ntp ntpdate openbios-sparc openssh-client openssh-server php5
  php5-cli php5-common php5-gd php5-mysql python python-cairo python-gobject python-minimal python2.5 python2.5-minimal qemu
  readline-common recode screen sed sharutils sudo sysv-rc tshark udev update-inetd util-linux vde2 wget wine-bin wine-utils wireshark
  wireshark-common x11-utils xserver-xorg xserver-xorg-core xserver-xorg-input-evdev xserver-xorg-input-kbd xserver-xorg-input-mouse
  xserver-xorg-input-synaptics xserver-xorg-input-wacom xserver-xorg-video-all xserver-xorg-video-apm xserver-xorg-video-ark
  xserver-xorg-video-ati xserver-xorg-video-chips xserver-xorg-video-cirrus xserver-xorg-video-dummy xserver-xorg-video-fbdev
  xserver-xorg-video-glint xserver-xorg-video-i128 xserver-xorg-video-i740 xserver-xorg-video-intel xserver-xorg-video-mach64
  xserver-xorg-video-mga xserver-xorg-video-neomagic xserver-xorg-video-nv xserver-xorg-video-openchrome xserver-xorg-video-r128
  xserver-xorg-video-radeon xserver-xorg-video-radeonhd xserver-xorg-video-rendition xserver-xorg-video-s3 xserver-xorg-video-s3virge
  xserver-xorg-video-savage xserver-xorg-video-siliconmotion xserver-xorg-video-sis xserver-xorg-video-sisusb xserver-xorg-video-tdfx
  xserver-xorg-video-tga xserver-xorg-video-trident xserver-xorg-video-tseng xserver-xorg-video-vesa xserver-xorg-video-vmware
  xserver-xorg-video-voodoo xterm
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  apt libstdc++6 (due to apt) lzma (due to dpkg)
178 upgraded, 123 newly installed, 94 to remove and 6 not upgraded.
Need to get 200 MB of archives.
After this operation, 123 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
 ?] ^C
share|improve this question
    
Can you include output of apt-cache policy apt dpkg and/or cat /etc/apt/sources.list. –  Tshepang Feb 14 '11 at 15:10
add comment

2 Answers

up vote 2 down vote accepted

Eh, i have managed to track down the source of my problems to a dodgy version of libstdc++

Somehow i had a version of libstdc++6 installed that depended on gcc-4.4-base (= 4.4.5-10) which doesnt even exist, the latest version is 4.4.5-8, I don't even know how is it possible.

I have downloaded gcc-4.4-base and libstdc and installed manually and that seems to have resolved the problem.

$ sudo apt-get install --reinstall libstdc++6
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reinstallation of libstdc++6 is not possible, it cannot be downloaded.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libstdc++6 : Depends: gcc-4.4-base (= 4.4.5-10) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
share|improve this answer
    
What is the output of apt-cache policy? It will tell you what versions of libstdc++6 you have. You most likely got it from Wheezy or Sid. –  Tshepang Feb 14 '11 at 17:55
    
indeed 4.4.5-10 is the version in wheezy, according to dpkg.log it got installed on 13th of December –  Aleksandar Ivanisevic Feb 14 '11 at 20:22
    
But, I always had stable as the default, really no idea how it could have happened –  Aleksandar Ivanisevic Feb 14 '11 at 20:30
    
see also: theether.net/kb/100182 –  zebonaut Dec 24 '11 at 2:06
add comment

The common procedure is to first do a normal upgrade sudo apt-get upgrade, and then a dist-upgrade, sudo apt dist-upgrade. If you still get the same problem, follow ooshro's answer.

share|improve this answer
    
thanks, thats what I did already before posting, it upgraded tons of packages but still wants to remove apt on dist-upgrade –  Aleksandar Ivanisevic Feb 14 '11 at 14:03
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.