Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Install Dropbox with CLI Only
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 698
Location: San Diego, CA

PostPosted: Mon Dec 03, 2018 11:08 pm    Post subject: [Solved] Install Dropbox with CLI Only Reply with quote

I'm trying to install Dropbox on a machine that has command line only (i.e. no X), but none of the methods I tried worked.

First, "pygtk" tried to pull a bunch of X-related packages, so that's a no-go.
Code:
$ dropbox-cli start -i
Starting Dropbox...Traceback (most recent call last):
  File "/usr/lib/python-exec/python2.7/dropbox-cli", line 1255, in start
    download()
  File "/usr/lib/python-exec/python2.7/dropbox-cli", line 279, in download
    import pygtk
ImportError: No module named pygtk



Next, "PyQt5" also requires X, so that's not going to work either.
Code:
$ dropbox -i
Traceback (most recent call last):
  File "dropbox/client/main.pyc", line 6784, in main_startup
  File "dropbox/client/main.pyc", line 3131, in run
  File "ui/common/uikit.pyc", line 800, in create_ui_kit
  File "dropbox/client/ui/qt/__init__.pyc", line 40, in <module>
ImportError: No module named 'PyQt5.QtWebKit'



And when I tried the file directly from Dropbox, it mysteriously crashes with no clear info.
Code:

$ cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf -
$ ~/.dropbox-dist/dropboxd

dropbox: locating interpreter
dropbox: logging to /tmp/dropbox-antifreeze-VvXAn2
dropbox: initializing
dropbox: initializing python 3.5.4
dropbox: setting program path '/home/solamour/.dropbox-dist/dropbox-lnx.x86-62.4.103/dropbox'
dropbox: setting home path '/home/solamour/.dropbox-dist/dropbox-lnx.x86-62.4.103'
dropbox: setting python path '/home/solamour/.dropbox-dist/dropbox-lnx.x86-62.4.103:/home/solamour/.dropbox-dist/dropbox-lnx.x86-62.4.103/python-packages-35.zip'
dropbox: python initialized
dropbox: running dropbox
dropbox: setting args
dropbox: applying overrides
dropbox: running main script
dropbox: load fq extension '/home/solamour/.dropbox-dist/dropbox-lnx.x86-62.4.103/cryptography.hazmat.bindings._constant_time.cpython-35m-i386-linux-gnu.so'
dropbox: load fq extension '/home/solamour/.dropbox-dist/dropbox-lnx.x86-62.4.103/cryptography.hazmat.bindings._openssl.cpython-35m-i386-linux-gnu.so'
dropbox: load fq extension '/home/solamour/.dropbox-dist/dropbox-lnx.x86-62.4.103/cryptography.hazmat.bindings._padding.cpython-35m-i386-linux-gnu.so'
dropbox: load fq extension '/home/solamour/.dropbox-dist/dropbox-lnx.x86-62.4.103/psutil._psutil_linux.cpython-35m-i386-linux-gnu.so'
dropbox: load fq extension '/home/solamour/.dropbox-dist/dropbox-lnx.x86-62.4.103/psutil._psutil_posix.cpython-35m-i386-linux-gnu.so'
dropbox: load fq extension '/home/solamour/.dropbox-dist/dropbox-lnx.x86-62.4.103/linuxffi.pthread._linuxffi_pthread.cpython-35m-i386-linux-gnu.so'
dropbox: load fq extension '/home/solamour/.dropbox-dist/dropbox-lnx.x86-62.4.103/tornado.speedups.cpython-35m-i386-linux-gnu.so'
dropbox: load fq extension '/home/solamour/.dropbox-dist/dropbox-lnx.x86-62.4.103/cpuid.compiled._cpuid.cpython-35m-i386-linux-gnu.so'
dropbox: load fq extension '/home/solamour/.dropbox-dist/dropbox-lnx.x86-62.4.103/linuxffi.resolv.compiled._linuxffi_resolv.cpython-35m-i386-linux-gnu.so'
dropbox: load fq extension '/home/solamour/.dropbox-dist/dropbox-lnx.x86-62.4.103/linuxffi.gnu.compiled._linuxffi_gnu.cpython-35m-i386-linux-gnu.so'
dropbox: load fq extension '/home/solamour/.dropbox-dist/dropbox-lnx.x86-62.4.103/linuxffi.sys.compiled._linuxffi_sys.cpython-35m-i386-linux-gnu.so'
Illegal instruction


I'd appreciate any help/suggestions on how to proceed from here.
__
sol


Last edited by solamour on Tue Jan 08, 2019 7:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21633

PostPosted: Tue Dec 04, 2018 2:24 am    Post subject: Reply with quote

For the first two, the ebuild that provided dropbox-cli should have insisted you install the appropriate Python modules. Did you bypass the ebuild's dependencies?

For the third one, that is easy. The binary was compiled to use instructions that your CPU does not understand. You can upgrade your CPU to support those instructions or recompile the program to use only instructions your CPU accepts. The latter would unquestionably be cheaper, except that it appears you are running a prebuilt program. Therefore, you must get the person who built it to recompile it for you, or provide you with instructions on how to recompile it yourself. The latter is likely impossible if the program is proprietary.
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 698
Location: San Diego, CA

PostPosted: Tue Dec 04, 2018 2:53 am    Post subject: Reply with quote

"net-misc/dropbox" has "X" flag, but it's off by default, so it doesn't bring in X unless I ask for it.
"net-misc/dropbox-cli" is just a Python script.


Code:
[?] net-misc/dropbox
     Available versions:  45.3.88^ms (~)48.3.56^ms {X +librsync-bundled selinux PYTHON_SINGLE_TARGET="python2_7 python3_5 python3_6" PYTHON_TARGETS="python2_7 python3_5 python3_6"}
     Installed versions:  58.3.88-r1^ms(11:11:56 PM 12/02/2018)(librsync-bundled -X -selinux PYTHON_SINGLE_TARGET="python3_6 -python2_7 -python3_5" PYTHON_TARGETS="python2_7 python3_6 -python3_5")
     Homepage:            https://www.dropbox.com/
     Description:         Dropbox daemon (pretends to be GUI-less)

[I] net-misc/dropbox-cli
     Available versions:  1-r1 1.6.0 ~1.6.0-r1 {PYTHON_TARGETS="python2_7"}
     Installed versions:  1.6.0(11:13:46 PM 12/02/2018)(PYTHON_TARGETS="python2_7")
     Homepage:            https://www.dropbox.com/
     Description:         Cli interface for dropbox (python), part of nautilus-dropbox



I doubt Dropbox would create a special build, just for me.

Anyhow, I have a similarly configured machine with X, and Dropbox does work correctly there. The problem is, the portage version (58.3.88 as of now) is older than the official stable version from Dropbox (62.4.103), and it keeps complaining that it will stop working in a couple of weeks unless I upgrade to the latest. Version 62.4.103 also crashes with the same result in the machine with X, so I guess they decided not to support old machines.
__
sol
Back to top
View user's profile Send private message
solamour
l33t
l33t


Joined: 21 Dec 2004
Posts: 698
Location: San Diego, CA

PostPosted: Tue Jan 08, 2019 7:26 pm    Post subject: Reply with quote

After much fiddling, I found a few things that I didn't know before. I'll summarize them here in case someone else encounters similar problems.

1) Despite "cli" in its package name, looks like "net-misc/dropbox-cli" requires X, there is no way around it. You can install "net-misc/dropbox" without X, but that doesn't seem to be the case for "net-misc/dropbox-cli".

2) If "DISPLAY" is set anything other than nothing, Dropbox will try to load X (i.e. "PyQt5.QtWebKit" and related modules). If your system doesn't have X, Dropbox will fail to start.
To go around that problem, use "DISPLAY= ~/.dropbox-dist/dropboxd" instead. If it's the first time you run it, it will show a URL to link your system to Dropbox.

3) If your system is an old 32-bit machine, Dropbox might fail to start with mysterious "Illegal instruction". This is a known issue, and https://www.dropboxforum.com/t5/Installation-and-desktop-app/Linux-Dropbox-doesn-t-start-Illegal-instruction/td-p/319640 is a temporary solution. In short, remove "nucleus_python.cpython..." file.
This can lead to a truly annoying problem. Let's say you install Dropbox via either Portage or directly downloading it from Dropbox. You remove "nucleus_python.cpython..." file and it runs OK. Then Dropbox tries to download an updated version and unzip it in "/tmp" directory. But that will fail to start, because the updated version in "/tmp" has "nucleus_python.cpython..." file. So it tries again and fails again. You will be stuck with everlasting "Upgrading Dropbox..." state.
If that ever happens, check "/tmp/.dropbox*" directory and what the latest version Dropbox is trying to upgrade to. For me, that was "65.3.160", so I just download it directly from "https://clientupdates.dropboxstatic.com/dbx-releng/client/dropbox-lnx.x86-65.3.160.tar.gz", unzip it, remove ""nucleus_python.cpython" file, and use "dropbox.py" (from Dropbox site) instead of "dropbox-cli".

Thanks everyone for taking time to share your opinions and suggestions.
__
sol
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum