36

Since a while, 2 weeks, Dropbox does not startup anymore on my laptop running Ubuntu 12.04 LTS with GNOME shell.

When I run dropbox start -i in the console I get the following output.

  Starting Dropbox...Traceback (most recent call last):
  File "/usr/bin/dropbox", line 1387, in <module>
    ret = main(sys.argv)
  File "/usr/bin/dropbox", line 1376, in main
    result = commands[argv[i]](argv[i+1:])
  File "/usr/bin/dropbox", line 1247, in start
    if not start_dropbox():
  File "/usr/bin/dropbox", line 731, in start_dropbox
    stderr=sys.stderr, stdout=f, close_fds=True)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
  OSError: [Errno 8] Exec format error

I already removed Dropbox and reinstalled it. What should I do to fix this?

Olli
  • 8,811
  • 1
  • 34
  • 40
WG-
  • 1,750
  • 5
  • 21
  • 32

6 Answers6

36

I had a similar error, and this worked:

rm -rf $HOME/.dropbox-dist
dropbox start -i

After running those commands in the terminal, let the dropbox downloader run and install. It should work immediately after it finishes.

morhook
  • 1,583
  • 13
  • 22
26

I had the same problem and found this fix

Basically, I fixed the error by reinstalling dropbox distribution with the following terminal commands:

sudo rm -rf /var/lib/dropbox/.dropbox-dist
dropbox start -i
Alistair Buxton
  • 6,651
  • 3
  • 34
  • 65
user186476
  • 361
  • 3
  • 2
  • 1
    not sure if it has since been updated, but I am `4.2.5-1-ARCH`, and it was located at `$HOME/.dropbox-dist` as @morhook suggested below (http://askubuntu.com/a/416981/307798) – dylnmc Dec 04 '15 at 17:00
  • Worked for me, thanks very much for your answer. Ubuntu desktop - 14.04 LTS 64 Bit – ynnekkram Feb 12 '16 at 08:53
  • 1
    For some reason I had the directory under both `/var/lib/dropbox/` and `$HOME`. There was an older version in the former. – jarno Jan 11 '17 at 07:10
25

Try to reinstall dropbox.

First open a terminal and type the following to remove dropbox:

sudo apt-get clean
sudo apt-get update
sudo apt-get --purge remove nautilus-dropbox
sudo apt-get --purge autoremove

Now type the next commands in sequence to install dropbox.

sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E
sudo add-apt-repository "deb http://linux.dropbox.com/ubuntu $(lsb_release -sc) main"
sudo apt-get update && sudo apt-get install nautilus-dropbox

Source

efthialex
  • 3,781
  • 1
  • 23
  • 31
  • 1
    This worked for me apart from apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E That command just hung. Doing the purge, update and install of Dropbox seemed sufficient. – Giles Roberts Feb 04 '13 at 11:55
  • Sorry but this did not work for me. Firstly I installed `dropbox` and not `nautilus-dropbox`. I got the following error `W: A error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://linux.dropbox.com precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY FC918B335044912E W: Failed to fetch http://linux.dropbox.com/ubuntu/dists/precise/Release W: Some index files failed to download. They have been ignored, or old ones used instead.` – WG- Feb 04 '13 at 12:31
  • 4
    `The following packages have unmet dependencies: nautilus-dropbox : Depends: dropbox but it is not going to be installed E: Unable to correct problems, you have held broken packages.` – WG- Feb 04 '13 at 12:32
  • 2
    Then try this to install it: `cd ~ && wget -O - "http://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -` and to run type this: `~/.dropbox-dist/dropboxd` – efthialex Feb 04 '13 at 12:37
  • `/.dropbox-dist/dropbox: Syntax error: "(" unexpected` :( – WG- Feb 04 '13 at 12:59
  • 4
    1) delete the `.dropbox-dist` folder from your home. 2) open a terminal and type: `dropbox start` 3) then type `dropbox start -i` to link your account – efthialex Feb 04 '13 at 13:19
5

I had the same issue but none of this worked. But I found there was a running dropbox process. Even when I asked the status it showed as stopped and it didn't work at all.

My solution was to kill the dropbox process, remove the .dropbox-dist directory and run it again.

First find the dropbox process:

$ ps ax | grep dropbox
5490 ?        SNsl   0:01 /home/frankie/.dropbox-dist/dropbox-lnx.x86-2.10.52/dropbox
$ kill -TERM 5490

Then remove the dist dir and start it again

$ rm .dropbox/dropbox.pid
$ dropbox start -i

Hope this helps.

Francesc Guasch
  • 509
  • 3
  • 9
0

The only way I could fix it (luckily everything was already synced) was by doing ... (Don't do this is you haven't backed things up or the files are not synced):

sudo apt-get remove --purge dropbox # (for me this was actually sudo pacman -Rncs dropbox because I am on arch ... basically, you just need to remove it)

find / -name "\*ropbox\*" 2>/dev/null

Remove everything associated with the dropbox (including $HOME/.dropbox-dist, $HOME/Dropbox (will wipe your data obviously, so back it up into a temp. directory or something!!), etc).

No clue why this stopped working, but doing rm -rf $HOME/.dropbox-dist unfortunately didn't work for me.

Hope this helps.

Anwar
  • 75,875
  • 31
  • 191
  • 309
dylnmc
  • 266
  • 2
  • 6
0

Uninstall and then follow the official instructions:

cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
~/.dropbox-dist/dropboxd &
e18r
  • 259
  • 8
  • 11