sudo apt-get destroy?


9 posts
by ceefan » Thu Jun 28, 2012 5:07 pm
Does anybody have any insights as to why this is trying to cripple my Wheezy system?

I just wanted to install mdadm, but check out the packages that would be removed:

Code: Select all
pi@raspberrypi ~ $ uname -a
Linux raspberrypi 3.1.9+ #125 PREEMPT Sun Jun 17 16:09:36 BST 2012 armv6l GNU/Linux
pi@raspberrypi ~ $ sudo apt-get install mdadm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  fuse hdparm libatasmart4 libfuse2 libgudev-1.0-0 libsgutils2-2 mtools
  ntfs-3g
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  exim4-base exim4-config exim4-daemon-light heirloom-mailx libssl0.9.8
  makedev
Suggested packages:
  mail-reader eximon4 exim4-doc-html exim4-doc-info spf-tools-perl swaks exim4
  mail-transport-agent
Recommended packages:
  mailx
The following packages will be REMOVED:
  alsa-base console-setup console-setup-linux dmsetup e2fsprogs eject ifupdown
  initscripts keyboard-configuration libdevmapper-event1.02.1
  libdevmapper1.02.1 liblvm2app2.2 libparted0debian1 nfs-common openssh-server
  parted powermgmt-base procps raspi-config rpcbind rsyslog ssh sysvinit udev
  udisks util-linux wpasupplicant xserver-xorg xserver-xorg-core
  xserver-xorg-input-all xserver-xorg-input-evdev xserver-xorg-input-synaptics
  xserver-xorg-video-fbdev
The following NEW packages will be installed:
  exim4-base exim4-config exim4-daemon-light heirloom-mailx libssl0.9.8
  makedev mdadm
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  e2fsprogs util-linux (due to e2fsprogs) sysvinit initscripts (due to
  sysvinit)
0 upgraded, 7 newly installed, 33 to remove and 0 not upgraded.
Need to get 3,741 kB of archives.
After this operation, 14.6 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!'
 ?] 
Posts: 15
Joined: Fri Mar 16, 2012 7:46 pm
by HerrMaulwurf » Thu Jun 28, 2012 7:36 pm
Don't think this will destroy your system, because none of the listed packages is critical for your system.

Besides, as long as you don't run "apt-get autoremove" Debian will not remove those packages.
Posts: 17
Joined: Fri May 18, 2012 1:48 pm
by ceefan » Thu Jun 28, 2012 7:58 pm
as long as you don't run "apt-get autoremove"

Please read farther down in the output.

ssh, raspi-config, initscripts, xserver-xorg, dmsetup, parted, udev... These are all pretty critical packages. Installing mdadm (RAID software) will remove them. Note the nonstandard confirmation line: To continue type in the phrase 'Yes, do as I say!'

What is causing the system to want to remove all of these packages?
Posts: 15
Joined: Fri Mar 16, 2012 7:46 pm
by rasbeer » Thu Jun 28, 2012 8:08 pm
ceefan wrote:Note the nonstandard confirmation line: To continue type in the phrase 'Yes, do as I say!'

That's quite a confirmation it's asking for. I'm curious about why it wants to remove that stuff too...
Posts: 242
Joined: Wed Mar 07, 2012 8:35 am
by anwe79 » Thu Jun 28, 2012 8:55 pm
I haven't looked at the details, but knowing apt, this is a dependency problem.
Something you are installing ( or some of the depencies) is causing a conflict.

It could be some package foo needs package bar version >= x, while package baz needs the same package bar but version < x. Or some packages just plain conflicts (they may be incompatible and cause issues if installed in paralell).

The easiest way to resolve it is using aptitude. If you line up the same changes it will report the conflicts on the bottom of the screen. You then press "e" to have a look at what's going on, and it suggests some (although not always good) ways to solve the problem. You can mark actions with "a" for approve and "r" for reject to guide the conflict resolution in the right direction. You then press "." to see the next suggestion, and hopefully you will find a state that makes sense.

This can sometimes be tricky on a "testing/unstable" system as there are times when the package repositories simply do not make sense, there may be dependencies missing. That is rare though. It will rarely leave your system in an unfixable state. If it really seems impossible to find a good solution, the best path is often to wait a few days until the repositories have been updated to a sane state. Note that this scenario is highly unlikely in the "stable" branches, those repositiories have much stricter rules.
Posts: 26
Joined: Sat Oct 08, 2011 10:30 pm
by anwe79 » Thu Jun 28, 2012 9:11 pm
I had another look at the output and it seems very strange. Why does it want to install a bunch of exim4 packages? Something is definitely wrong, don't go ahead with those changes...

Use aptitude to reset the "pending changes" (i forget the exact words, it's in the menu , F10). That clears any pending installations/removals that may have been left lurking behind by some prior command. Then update the package list (assuming you have a net connection). Then try to mark mdadm and see what it want's to do.

If you have "broken" packages (which seems likely) it will tell you, you can skip to the next broken package with "b". Upgrading packages can often (but not always) be a good way to resolve conflicts.

It may be that mdadm depends on an MTA for alert messages, but for those something more lightweigth than exim4 is probably a better idea (exim4 is iirc the default MTA in Debian). And it shouldn't nuke your system just installing exim4 either...
Posts: 26
Joined: Sat Oct 08, 2011 10:30 pm
by ceefan » Thu Jun 28, 2012 9:17 pm
Thanks, anwe79.

Aptitude doesn't show any broken packages, and everything else is up to date.

It looks like in this particular case, it's in conflict with the Wheezy version of initscripts. Aptitude suggests rolling it back to the Squeeze version which would also roll back lots of other packages. Also, I gather that mdadm relies on a mail server (disk failure notification), and I think it's trying to use one that requires exim4.

Anyway, I think I'll either wait or build from source in the meantime.

Thanks for your insight!
Posts: 15
Joined: Fri Mar 16, 2012 7:46 pm
by HerrMaulwurf » Thu Jun 28, 2012 9:27 pm
Please read farther down in the output.


Oh f*ck, haven't seen the scroll bars... sorry!
Posts: 17
Joined: Fri May 18, 2012 1:48 pm
by plugwash » Sat Jun 30, 2012 11:37 pm
what is in your sources.list ?
what do you get when you try "apt-get install mdadm initscripts" ?
Forum Moderator
Forum Moderator
Posts: 2178
Joined: Wed Dec 28, 2011 11:45 pm