5

While installing dropbox from the repositories, my laptop ran out of power, and so the system went into a broken state. When I rebooted, I tried two methods to set it right. One was

sudo dpkg --configure -a

and

sudo apt-get install -f

Both were working fine, and they were downloading the dropbox package, but owing to my slow internet connection here, it's never getting completed, and is stuck at (at most) 47 %. A sample terminal-shot is

Setting up nautilus-dropbox (1.4.0-3)...
Dropbox is the easiest way to share and store your files online. Want to learn more? Head to http://www.dropbox.com/
Downloading Dropbox... 16%

So if this doesn't get completed the package will remain broken for ever, and I won't be able to install more software. So if there any way, I can rollback and then download dropbox from the site instead?

When I run dpkg -l | grep -v ^ii

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                      Version                                   Architecture Description
+++-=========================================-=========================================-============-==============================================================================
rc  libavcodec53:i386                         6:0.8.5-0ubuntu0.12.10.1                  i386         Libav codec library
rc  libavutil51:i386                          6:0.8.5-0ubuntu0.12.10.1                  i386         Libav utility library
iF  nautilus-dropbox                          1.4.0-3                                   i386         Dropbox integration for Nautilus
7
  • Perhaps sudo apt-get autoremove, sudo apt-get clean and sudo apt-get autoclean will work. Please try all of these.
    – Masroor
    Commented Mar 5, 2013 at 12:49
  • Please include in your question the output of dpkg -l | grep -v ^ii. This will list all packages not completely installed. Commented Mar 5, 2013 at 12:55
  • I'm apprehensive about these three commands, because the last time I used them, I could do nothing after that. I had to reinstall Ubuntu.
    – user42933
    Commented Mar 5, 2013 at 12:56
  • @EricCarvalho, here goes. Libav codec library, Libav utility library, nautilus-dropbox
    – user42933
    Commented Mar 5, 2013 at 12:57
  • @user42933 I think problem is nautilus-dropbox. This is not the full output spit by dpkg. Don't insert this in the comment area, please copy all the text from terminal, edit your QUESTION and include the text there. Commented Mar 5, 2013 at 13:02

2 Answers 2

4

Let's fool nautilus-dropbox configuration scripts.

Backup some files:

sudo cp -a /var/lib/dpkg/info/nautilus-dropbox.postinst /var/lib/dpkg/info/nautilus-dropbox.postinst.bkp
sudo cp -a /var/lib/dpkg/info/nautilus-dropbox.prerm /var/lib/dpkg/info/nautilus-dropbox.prerm.bkp

Write new empty postinst and prerm scripts:

echo '#!/bin/sh' | sudo tee /var/lib/dpkg/info/nautilus-dropbox.postinst
echo 'exit 0' | sudo tee -a /var/lib/dpkg/info/nautilus-dropbox.postinst
sudo cp -a /var/lib/dpkg/info/nautilus-dropbox.postinst /var/lib/dpkg/info/nautilus-dropbox.prerm

Now you should be able to remove nautilus-dropbox:

sudo apt-get purge nautilus-dropbox
3
  • I can't. E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
    – user42933
    Commented Mar 5, 2013 at 13:17
  • In fact autoclean or autoremove also doesn't work because of the same reason.
    – user42933
    Commented Mar 5, 2013 at 13:21
  • Answer updated. Commented Mar 5, 2013 at 14:08
-1

I just had the same problem and could fix it by running:

sudo dpkg --configure -a

and canceling it with CTRL+C. Then

sudo apt-get purge nautilus-dropbox

ran just fine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .