Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was trying to install TeamViewer, and I followed the instructions here even though they specify 11.10 instead of 12.04 (what I'm running).

In particular, I executed.

$ wget http://www.teamviewer.com/download/teamviewer_linux.deb
$ sudo dpkg -i teamviewer_linux.deb

The dpkg command failed, and after this point my packaging system has been broken. The software center instructs me to try:

$ sudo apt-get -f install

which leads to

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  teamviewer7:i386
0 upgraded, 0 newly installed, 1 to remove and 17 not upgraded.
9 not fully installed or removed.
Need to get 89.0 kB of archives.
After this operation, 81.9 MB disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main dash amd64 0.5.7-2ubuntu2 [89.0 kB]
Fetched 89.0 kB in 1s (83.9 kB/s)
E: Sub-process /usr/sbin/dpkg-preconfigure --apt || true returned an error code (100)
E: Failure running script /usr/sbin/dpkg-preconfigure --apt || true

At this point I'm stumped.

share|improve this question
add comment

2 Answers 2

I just ran into this issue and fixed it just now. I made three mistakes:

First, I downloaded it, attempted to install it and I realized my archive manager wasn't working properly. Next, when I tried to remove the package, the root user couldn't access dpkg, so I deferred the uninstall. Third was the worst: I restarted. By restarting Ubuntu 12.04, the OS was stuck booting forever just as you describe.

Fortunately, I had a copy of Finnix 103: http://www.finnix.org/. After a bit of analysis on the hard drive partition, I realized that bash, dash and sh have been deleted from the /bin directory. So, I copied them over from the Finnix installation:

# mount <ubuntu_partition> /mnt/linux
# cp /bin/bash /mnt/linux/bin/bash
# cp /bin/dash /mnt/linux/bin/dash
# cp /bin/sh /mnt/linux/bin/sh

At this point, I could use dpkg again while using chroot on my Ubuntu partition. I noticed again, however, that apt-get was insisting to remove dash again upon each command. So, I reinstalled dash:

# apt-get install dash

Finally, I restarted my computer and booted up into Ubuntu 12.04 just fine. I inspected the package history and these were my results:

http://sphotos-b.xx.fbcdn.net/hphotos-ash3/545946_10151063058008668_2004083202_n.jpg

All events at 5:28 PM were when I blindly executed the recommended TeamViewer 7 installation commands to get into an online meeting:

$ sudo dpkg -i teamviewer_linux.deb
$ sudo apt-get -f install

At this point, I didn't want any more of TeamViewer. So to clean up further, I purged teamviewer7:i386 using dpkg:

$ sudo dpkg --purge teamviewer7:i386
$ sudo apt-get remove teamviewer7:i386 

In conclusion, the TeamViewer 7 i386 version for Linux removes /bin/dash which is the root of all the symptoms from the terminal failure, to the dpkg failure to the boot failure.

share|improve this answer
add comment

First, remove Teamviewer with:

sudo dpkg -r teamviewer7

Then run

sudo apt-get update && sudo apt-get -f install
share|improve this answer
    
I'll upvote, but not accept, because I have no way of confirming. Things got worse from here, to where I had no working terminal, and then couldn't boot. I reinstalled. –  Eric Wilson Sep 10 '12 at 9:59
    
This command won't work because bash, dash and sh have been deleted. So, root won't be able to access it; the evidence is here: E: Sub-process /usr/sbin/dpkg-preconfigure --apt || true returned an error code (100) E: Failure running script /usr/sbin/dpkg-preconfigure --apt || true –  Gio Borje Sep 11 '12 at 8:11
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.