Seafile client Ubuntu 17.04

Apparently there is no build available for Ubuntu 17.04. And i cannot get the cli client working:

$ seaf-cli init -d /home/user/Seafile
Traceback (most recent call last):
  File "/usr/bin/seaf-cli", line 86, in <module>
    import seafile
ImportError: No module named seafile

Anyone else have this problem?

Did you install the libseafile0 package?

Yep:

$ apt-cache policy libseafile0
libseafile0:
  Installed: 6.0.2-1
  Candidate: 6.0.2-1
  Version table:
 *** 6.0.2-1 500
        500 http://archive.ubuntu.com/ubuntu zesty/universe amd64 Packages
        100 /var/lib/dpkg/status

And the cli and daemon are installed

$ apt-cache policy seafile-cli seafile-daemon
seafile-cli:
  Installed: 6.0.2-1
  Candidate: 6.0.2-1
  Version table:
 *** 6.0.2-1 500
        500 http://archive.ubuntu.com/ubuntu zesty/universe amd64 Packages
        100 /var/lib/dpkg/status
seafile-daemon:
  Installed: 6.0.2-1
  Candidate: 6.0.2-1
  Version table:
 *** 6.0.2-1 500
        500 http://archive.ubuntu.com/ubuntu zesty/universe amd64 Packages
        100 /var/lib/dpkg/status

All from the zesty repo

Strange:

# grep import /usr/bin/seaf-cli | tail -2
import ccnet
import seafile

So ccnet gets imported but seafile does not? Both should be installed under /usr/lib/python2.7/dist-packages

Hardcore check where the system tries to find the libraries: strace -ff -s0 seaf-cli 2>&1 | grep seafile

Yes, it’s missing the python package seafile:

ubuntu-mate@ubuntu-mate:~$ grep import /usr/bin/seaf-cli | tail -2
import ccnet
import seafile
ubuntu-mate@ubuntu-mate:~$ ll /usr/lib/python2.7/dist-packages
total 495
drwxr-xr-x 20 root root    80 Mar 23 21:05 ./
drwxr-xr-x 28 root root    60 Mar 23 21:05 ../
drwxr-xr-x  3 root root   460 Mar 23 21:05 ccnet/
drwxr-xr-x  2 root root   119 Jan 25 03:37 configobj-5.0.6.egg-info/
-rw-r--r--  1 root root 89613 Jul 21  2015 configobj.py
-rw-r--r--  1 root root 67016 Jan 25 03:40 configobj.pyc
drwxr-xr-x 10 root root   231 Jan 25 03:38 Crypto/
-rw-r--r--  1 root root  5971 Apr 27  2016 debconf.py
-rw-r--r--  1 root root   386 Oct 21  2015 deja_dup_caja-0.0.4.egg-info
-rw-r--r--  1 root root   313 Jan 31  2016 folder_color_caja-0.0.79.egg-info
-rw-r--r--  1 root root   303 Jan 31  2016 folder_color_common-0.0.79.egg-info
drwxr-xr-x  5 root root   546 Jan 25 03:40 gi/
drwxr-xr-x  2 root root   122 Jan 25 03:39 glib/
drwxr-xr-x  2 root root   182 Jan 25 03:39 gobject/
drwxr-xr-x  3 root root    65 Jan 25 03:39 gtk-2.0/
-rw-r--r--  1 root root  3564 Feb 26  2016 _ldb_text.py
-rw-r--r--  1 root root  6100 Jan 25 03:42 _ldb_text.pyc
-rw-r--r--  1 root root 88728 Sep 22 07:17 ldb.x86_64-linux-gnu.so
lrwxrwxrwx  1 root root    38 Jul  6  2016 lsb_release.py -> ../../../share/pyshared/lsb_release.py
drwxr-xr-x  2 root root   216 Jan 25 03:37 mate_invest/
drwxr-xr-x  3 root root   380 Jan 25 03:42 mate_menu/
drwxr-xr-x  2 root root   100 Jan 25 03:37 mate_menu-16.10.1.egg-info/
-rw-r--r--  1 root root 30512 Jan 19 21:37 matemenu.x86_64-linux-gnu.so
drwxr-xr-x  2 root root   206 Jan 25 03:42 Mozo/
drwxr-xr-x  4 root root    83 Jan 25 03:39 pkg_resources/
-rw-r--r--  1 root root   666 Jan 18  2016 pycrypto-2.6.1.egg-info
-rw-r--r--  1 root root  1013 Dec 12 19:37 pygobject-3.22.0.egg-info
drwxr-xr-x  2 root root   154 Jan 25 03:40 pygtkcompat/
-rw-r--r--  1 root root     8 Jan 29  2016 pygtk.pth
-rw-r--r--  1 root root  2966 Jan 29  2016 pygtk.py
-rw-r--r--  1 root root  2051 Jan 25 03:39 pygtk.pyc
drwxr-xr-x  2 root root   200 Mar 23 21:05 pysearpc/
-rw-r--r--  1 root root   242 Sep 15  2015 python_xlib-0.14.egg-info
-rw-r--r--  1 root root   576 Jan 29  2014 pyxdg-0.25.egg-info
-rw-r--r--  1 root root   119 Jan 19 14:48 README
drwxr-xr-x 11 root root  1397 Jan 25 03:42 samba/
drwxr-xr-x  2 root root    80 Jan 25 03:37 six-1.10.0.egg-info/
-rw-r--r--  1 root root 30098 Oct  7  2015 six.py
-rw-r--r--  1 root root 30098 Jan 25 03:39 six.pyc
-rw-r--r--  1 root root 10904 Oct  8 21:16 talloc.x86_64-linux-gnu.so
-rw-r--r--  1 root root  3362 Jul 21  2015 _tdb_text.py
-rw-r--r--  1 root root  5365 Jan 25 03:38 _tdb_text.pyc
-rw-r--r--  1 root root 24440 Oct  9 16:04 tdb.x86_64-linux-gnu.so
-rw-r--r--  1 root root 47237 Aug 26  2014 validate.py
-rw-r--r--  1 root root 47532 Jan 25 03:40 validate.pyc
-rw-r--r--  1 root root    21 Aug 26  2014 _version.py
-rw-r--r--  1 root root   163 Jan 25 03:40 _version.pyc
drwxr-xr-x  2 root root   522 Jan 25 03:40 xdg/
drwxr-xr-x  7 root root   474 Jan 25 03:39 Xlib/
ubuntu-mate@ubuntu-mate:~$ strace -ff -s0 seaf-cli 2>&1 | grep seafile
stat("/usr/bin/seafile", 0x7ffe0929ec60) = -1 ENOENT (No such file or directory)
open("/usr/bin/seafile.x86_64-linux-gnu.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/bin/seafile.so", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/bin/seafilemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/bin/seafile.py", O_RDONLY)   = -1 ENOENT (No such file or directory)
open("/usr/bin/seafile.pyc", O_RDONLY)  = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/seafile", 0x7ffe0929ec60) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/seafile.x86_64-linux-gnu.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/seafile.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/seafilemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/seafile.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/seafile.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/plat-x86_64-linux-gnu/seafile", 0x7ffe0929ec60) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-x86_64-linux-gnu/seafile.x86_64-linux-gnu.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-x86_64-linux-gnu/seafile.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-x86_64-linux-gnu/seafilemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-x86_64-linux-gnu/seafile.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/plat-x86_64-linux-gnu/seafile.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/lib-tk/seafile", 0x7ffe0929ec60) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/seafile.x86_64-linux-gnu.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/seafile.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/seafilemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/seafile.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-tk/seafile.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/lib-dynload/seafile", 0x7ffe0929ec60) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/seafile.x86_64-linux-gnu.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/seafile.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/seafilemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/seafile.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/lib-dynload/seafile.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/local/lib/python2.7/dist-packages/seafile", 0x7ffe0929ec60) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/dist-packages/seafile.x86_64-linux-gnu.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/dist-packages/seafile.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/dist-packages/seafilemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/dist-packages/seafile.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/python2.7/dist-packages/seafile.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/dist-packages/seafile", 0x7ffe0929ec60) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/dist-packages/seafile.x86_64-linux-gnu.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/dist-packages/seafile.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/dist-packages/seafilemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/dist-packages/seafile.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/dist-packages/seafile.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
stat("/usr/lib/python2.7/dist-packages/gtk-2.0/seafile", 0x7ffe0929ec60) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/dist-packages/gtk-2.0/seafile.x86_64-linux-gnu.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/dist-packages/gtk-2.0/seafile.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/dist-packages/gtk-2.0/seafilemodule.so", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/dist-packages/gtk-2.0/seafile.py", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/python2.7/dist-packages/gtk-2.0/seafile.pyc", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, ""..., 15import seafile
write(2, ""..., 23No module named seafile)                     = 23
ubuntu-mate@ubuntu-mate:~$

It’s referenced but doesn’t exist

The libseafile0 package from the zesty repository is broken!

->dpkg-deb -c libseafile0_6.0.2-1_amd64.deb
drwxr-xr-x root/root         0 2017-01-20 16:19 ./
drwxr-xr-x root/root         0 2017-01-20 16:19 ./usr/
drwxr-xr-x root/root         0 2017-01-20 16:19 ./usr/lib/
drwxr-xr-x root/root         0 2017-01-20 16:19 ./usr/lib/x86_64-linux-gnu/
-rw-r--r-- root/root    153512 2017-01-20 16:19 ./usr/lib/x86_64-linux-gnu/libseafile.so.0.0.0
drwxr-xr-x root/root         0 2017-01-20 16:19 ./usr/share/
drwxr-xr-x root/root         0 2017-01-20 16:19 ./usr/share/doc/
drwxr-xr-x root/root         0 2017-01-20 16:19 ./usr/share/doc/libseafile0/
-rw-r--r-- root/root       375 2017-01-20 16:19 ./usr/share/doc/libseafile0/changelog.Debian.gz
-rw-r--r-- root/root      3486 2017-01-20 16:19 ./usr/share/doc/libseafile0/copyright
lrwxrwxrwx root/root         0 2017-01-20 16:19 ./usr/lib/x86_64-linux-gnu/libseafile.so.0 -> libseafile.so.0.0.0

Installed package (from the official seafile PPA) on my ubuntu 16.04:

->dpkg-query -L libseafile0
/.
/usr
/usr/lib
/usr/lib/libseafile.so.0.0.0
/usr/lib/python2.7
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/seafile
/usr/lib/python2.7/dist-packages/seafile/rpcclient.py
/usr/lib/python2.7/dist-packages/seafile/__init__.py
/usr/share
/usr/share/doc
/usr/share/doc/libseafile0
/usr/share/doc/libseafile0/changelog.Debian.gz
/usr/share/doc/libseafile0/copyright
/usr/lib/libseafile.so.0

HTH!

According to https://code.launchpad.net/~seafile/+archive/ubuntu/seafile-client/+packages , the latest version of seafile client is 6.0.4. IIRC, the 6.0.2 package did miss the seafile python library.

So is there a fix for this? Or do we just wait until libseafile0 is fixed?

You need to wait until Ubuntu imports the updated packages from Debian…
Or you use the Bintray repo referenced on the Seafile Client Download page.

I use the Bintray repo referenced on the Seafile Client Download page but there is no build for ubuntu 17.04

We’ll add it in some time.

2 Likes

That would be great! Can’t use seafile right now, because of that, only from the browser.

Until the team import the debian libraries over to Ubuntu. You can just use the debian packages for seafile-gui in 17.04

Remove seafile ppa if you use it (maybe it does not need to be done, but i removed the ubuntu ppa until it contains the 17.04 packages. i"m not a fan of having multiple sources for the same packages.

sudo add-apt-repository --remove ppa:seafile/seafile-client

Add the debian repo key

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 8756C4F765C9AC3CB6B85D62379CE192D401AB61

Add debian repo to apt sources

echo deb http://dl.bintray.com/seafile-org/deb jessie main | sudo tee /etc/apt/sources.list.d/seafile.list

Update apt

sudo apt-get update

Install seafile-gui

sudo apt-get install seafile-gui

When the packages are available in the Ubuntu ppa, we can remove the debian repo.

2 Likes

Thank you philthynz, I had been trying to compile from source and even using snapcraft and was out of luck until I found your post.

FWIW, we have enabled the builds for ubuntu 17.04 and 17.10 on launchpad, and users who use those versions of ubuntu can install from the PPA directly now.

1 Like

Awesome news. Thanks Seafile team