Dropbox installation broke my software index (Ubuntu 12.04)

Asked by Sergio Martini Popoli

I'm running Ubuntu 12.04 (x32) on a desktop computer. I tried installing Dropbox from the Ubuntu Software Center and it got stuck almost at the end. So I tried to close the software center and restart. When I opened the Software Center Again I could see Dropbox installed, but I knew it wasn't ok because it hasn't finished installing so I clicked on Remove, and it also got stuck close to the end.

So i searched the web and ran :

   sudo apt-get remove dropbox; rm -rvf ~/.dropbox ~/.dropbox-dist
   E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
   E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

I think it's the Ubuntu Software Center... but I don't know how to kill that process safely. So I found the PackageManagerTroubleshootingProcedure here

   https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure

and ran the commands with the following results:

//------------------------------------------------------------------------------------------------------------------------

sudo apt-get install -f
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
sergio@sergio-All-Series:~$ ubuntu-support-status
Support status summary of 'sergio-All-Series':

You have 105 packages (4.2%) supported until October 2013 (18m)
You have 58 packages (2.3%) supported until January 2016 (18m)
You have 1601 packages (64.7%) supported until April 2017 (5y)

You have 1 packages (0.0%) that can not/no-longer be downloaded
You have 708 packages (28.6%) that are unsupported

Your current Hardware Enablement Stack (HWE) is going out of support
on 08/07/2014. After this date security updates for critical parts (kernel
and graphics stack) of your system will no longer be available.

For more information, please see:
http://wiki.ubuntu.com/1204_HWE_EOL

To upgrade to a supported (or longer supported) configuration:

* Upgrade from Ubuntu 12.04 LTS to Ubuntu 14.04 LTS by running:
sudo do-release-upgrade

OR

* Install a newer HWE version by running:
sudo apt-get install linux-generic-lts-trusty libgl1-mesa-glx-lts-trusty xserver-xorg-lts-trusty linux-image-generic-lts-trusty

and reboot your system.

Run with --show-unsupported, --show-supported or --show-all to see more details
sergio@sergio-All-Series:~$
sergio@sergio-All-Series:~$ cat /etc/dpkg/dpkg.cfg.d/multiarch
cat: /etc/dpkg/dpkg.cfg.d/multiarch: No such file or directory
sergio@sergio-All-Series:~$ ubuntu-support-status
Support status summary of 'sergio-All-Series':

You have 105 packages (4.2%) supported until October 2013 (18m)
You have 58 packages (2.3%) supported until January 2016 (18m)
You have 1601 packages (64.7%) supported until April 2017 (5y)

You have 1 packages (0.0%) that can not/no-longer be downloaded
You have 708 packages (28.6%) that are unsupported

Your current Hardware Enablement Stack (HWE) is going out of support
on 08/07/2014. After this date security updates for critical parts (kernel
and graphics stack) of your system will no longer be available.

For more information, please see:
http://wiki.ubuntu.com/1204_HWE_EOL

To upgrade to a supported (or longer supported) configuration:

* Upgrade from Ubuntu 12.04 LTS to Ubuntu 14.04 LTS by running:
sudo do-release-upgrade

OR

* Install a newer HWE version by running:
sudo apt-get install linux-generic-lts-trusty libgl1-mesa-glx-lts-trusty xserver-xorg-lts-trusty linux-image-generic-lts-trusty

and reboot your system.

Run with --show-unsupported, --show-supported or --show-all to see more details
sergio@sergio-All-Series:~$ cat /etc/dpkg/dpkg.cfg.d/multiarch
cat: /etc/dpkg/dpkg.cfg.d/multiarch: No such file or directory
sergio@sergio-All-Series:~$ dpkg --print-foreign-architectures

sergio@sergio-All-Series:~$ sudo grep -R proxy /etc/apt/*
sergio@sergio-All-Series:~$ grep proxy /etc/environment
sergio@sergio-All-Series:~$ echo $http_proxy

sergio@sergio-All-Series:~$ echo $ftp_proxy

sergio@sergio-All-Series:~$ grep proxy /etc/bash.bashrc
sergio@sergio-All-Series:~$ grep proxy ~/.bashrc
sergio@sergio-All-Series:~$ cat /etc/apt/apt.conf
cat: /etc/apt/apt.conf: No such file or directory
sergio@sergio-All-Series:~$ sudo fuser -vvv /var/lib/dpkg/lock
                     USER PID ACCESS COMMAND
/var/lib/dpkg/lock: root 2230 F.... dpkg
sergio@sergio-All-Series:~$ sudo fuser -vvv /var/cache/apt/archives/lock
                     USER PID ACCESS COMMAND
/var/cache/apt/archives/lock:
                     root 2224 F.... aptd
sergio@sergio-All-Series:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.4 LTS"
sergio@sergio-All-Series:~$ uname -a
Linux sergio-All-Series 3.11.0-24-generic #42~precise1-Ubuntu SMP Fri Jul 4 21:23:53 UTC 2014 i686 i686 i386 GNU/Linux
sergio@sergio-All-Series:~$ sudo rm /var/lib/apt/lists/lock
sergio@sergio-All-Series:~$ sudo rm /var/cache/apt/archives/lock
sergio@sergio-All-Series:~$ sudo rm /var/lib/dpkg/lock
sergio@sergio-All-Series:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
sergio@sergio-All-Series:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
sergio@sergio-All-Series:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
mv: cannot stat `/var/lib/dpkg/status': No such file or directory
sergio@sergio-All-Series:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
mv: cannot stat `/var/lib/dpkg/status': No such file or directory
sergio@sergio-All-Series:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status || sudo cp /var/backups/apt.extended_states.0 /var/lib/dpkg/status
sergio@sergio-All-Series:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
sergio@sergio-All-Series:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sergio@sergio-All-Series:~$ sudo rm -rf /var/lib/dpkg/updates/*
sergio@sergio-All-Series:~$ sudo rm -rf /var/lib/apt/lists
sergio@sergio-All-Series:~$ sudo rm /var/cache/apt/*.bin
sergio@sergio-All-Series:~$ sudo mkdir /var/lib/apt/lists
sergio@sergio-All-Series:~$ sudo mkdir /var/lib/apt/lists/partial
sergio@sergio-All-Series:~$ LANG=C;sudo apt-get clean
sergio@sergio-All-Series:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
sergio@sergio-All-Series:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up nautilus-dropbox (0.7.1-2) ...

Dropbox is the easiest way to share and store your files online. Want to learn more? Head to http://www.dropbox.com/

Downloading Dropbox... 100%

//------------------------------------------------------------------------------------------------------------------------

And it's stuck there...
Hope this is enough information to ask any help =)

Thank you!

Sergio MP

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
Sergio Martini Popoli
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Please provide the output of the terminal commands

sudo fuser -vvv /var/lib/dpkg/lock
sudo fuser -vvv /var/cache/apt/archives/lock
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
sudo dpkg --audit

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

Looks fine after the commands...... if you run:

sudo apt-get --reinstall install nano

is it smooth?

Revision history for this message
Giulio M (giulio-meleleo) said :
#3

I have the same exact problem. I did all Manfred told. Here's the output

giulio@giulio-HP-Pavilion-g6-Notebook-PC:~$ sudo fuser -vvv /var/lib/dpkg/lock
[sudo] password for giulio:
                     UTENTE PID ACCESSO COMANDO
/var/lib/dpkg/lock: root 2109 F.... dpkg
giulio@giulio-HP-Pavilion-g6-Notebook-PC:~$ sudo fuser -vvv /var/cache/apt/archives/lock
                     UTENTE PID ACCESSO COMANDO
/var/cache/apt/archives/lock:
                     root 2099 F.... aptd
giulio@giulio-HP-Pavilion-g6-Notebook-PC:~$ sudo rm /var/lib/apt/lists/lock
giulio@giulio-HP-Pavilion-g6-Notebook-PC:~$ sudo rm /var/cache/apt/archives/lockgiulio@giulio-HP-Pavilion-g6-Notebook-PC:~$ sudo rm /var/lib/dpkg/lock
giulio@giulio-HP-Pavilion-g6-Notebook-PC:~$ sudo dpkg --audit
dpkg: errore: impossibile aprire il file di blocco /var/lib/dpkg/lock per la verifica: File o directory non esistente

It's in italian, so if you don't understand just tell me.

Then I tried what actionparsnip suggested, and here's what happened

giulio@giulio-HP-Pavilion-g6-Notebook-PC:~$ sudo apt-get --reinstall install nano
E: dpkg è stato interrotto. È necessario eseguire "sudo dpkg --configure -a" per correggere il problema.
giulio@giulio-HP-Pavilion-g6-Notebook-PC:~$ sudo dpkg --configure -a
Configurazione di nautilus-dropbox (0.7.1-2)...

Dropbox is the easiest way to share and store your files online. Want to learn more? Head to http://www.dropbox.com/
Downloading Dropbox... 100%

Traceback (most recent call last):
  File "/usr/bin/dropbox", line 1384, in <module>
    ret = main(sys.argv)
  File "/usr/bin/dropbox", line 1373, in main
    result = commands[argv[i]](argv[i+1:])
  File "/usr/bin/dropbox", line 806, in update
    download()
  File "/usr/bin/dropbox", line 534, in download
    progress = one_chunk.next()[0]
  File "/usr/bin/dropbox", line 209, in download_file_chunk
    chunk = os.read(f.fileno(), 4096)
  File "/usr/lib/python2.7/socket.py", line 313, in fileno
    return self._sock.fileno()
  File "/usr/lib/python2.7/socket.py", line 223, in meth
    def meth(name,self,*args):
KeyboardInterrupt
dpkg: errore nell'elaborare nautilus-dropbox (--configure):
 sottoprocesso vecchio script di post-installation interrotto
Si sono verificati degli errori nell'elaborazione:
 nautilus-dropbox

I interrupted because it was blocked at the line "Downloading Dropbox... 100%" for about half an hour

What I can do? Thanks.

Revision history for this message
Sergio Martini Popoli (sergiompopoli) said :
#4

Ciao Giulio, The first thing is to REMOVE the broken dropbox package which is stuck, for this run:

sudo dpkg -r nautilus-dropbox

Then, the correct installation procedure that worked for me was:

https://answers.launchpad.net/ubuntu/+source/nautilus-dropbox/+question/201183

Adam Orwell (anopenid6045) said on 2012-06-23: #16

Seems like a lot of people are having this problem, and the original workaround left some information out, so here's an updated version.

Updated workaround procedure:

- Download the Dropbox .deb file from: https://www.dropbox.com/install?os=lnx
- Open the .deb with Ubuntu Software Center and begin installation
- When you see the screen saying "To complete installation, you must start Dropbox", press CANCEL
- Install the dropbox daemon (nautilus-dropbox) using one of these commands (from https://www.dropbox.com/install?os=lnx):
      For 32-bit operating systems:
            cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -
      For 64-bit operating systems:
            cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
- Start the dropbox daemon with this command:
      ~/.dropbox-dist/dropboxd
- Restart computer

Revision history for this message
Giulio M (giulio-meleleo) said :
#5

Thank you very much. It seems it works.

One last question. I started the dropbox daemon writing

~/.dropbox-dist/dropboxd

and i registered my dropbox on my laptop. Now it's uploading all the files.
How I can terminate the daemon from the terminal? Closing directly the derminal could be dangerous and bring to some problem.

Thank you again :)

Revision history for this message
Sergio Martini Popoli (sergiompopoli) said :
#6

I'm glad it helped!
Regarding your question, I don't really know. I'm pretty new to Linux myself. Anyone else knows about it?

Revision history for this message
tinulac (nicault-daniel) said :
#7

HI,

I read this post with interest ;)

All worked fine for me too but :

      For 64-bit operating systems:
            cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
Seems to work...

and the deamon starting command return an error :

~/.dropbox-dist/dropboxd

(dropbox:8392): Gtk-WARNING **: Impossible de trouver le moteur de thème dans module_path : « pixmap »

An ide about the way to solve ?

Regards,

Daniel

Revision history for this message
Manfred Hampl (m-hampl) said :
#8

@tinulac:

1. Please do not piggyback on someone else's question, but create a Launchpad answers document of your own.

2. Do you see these messages also after rebooting?
Maybe the terminal command
sudo apt-get install gtk2-engines-pixbuf
installs the missing package to eliminate the "Gtk-WARNING ... pixmap" messages.

Revision history for this message
tinulac (nicault-daniel) said :
#9

I just reboot befor your answer ans all il OK, thanks!

Daniel
Le 13 août 2014 15:13, "Manfred Hampl" <email address hidden>
a écrit :

> Question #251725 on apt in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/apt/+question/251725
>
> Manfred Hampl posted a new comment:
> @tinulac:
>
> 1. Please do not piggyback on someone else's question, but create a
> Launchpad answers document of your own.
>
> 2. Do you see these messages also after rebooting?
> Maybe the terminal command
> sudo apt-get install gtk2-engines-pixbuf
> installs the missing package to eliminate the "Gtk-WARNING ... pixmap"
> messages.
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Manjuvajra (thehut) said :
#10

Just want to say how grateful I am to you all - I had the same problem and it is now solved.