Seaf-cli on Raspian Stretch


has anyone running seaf-cli on Raspian Stretch? I tried the backports solution like described here, and tried to compile it all by myself. That fails while building the seafile-package. on step “./configure --prefix=$PREFIX --disable-fuse” i get a warning

configure: WARNING: unrecognized options: --disable-fuse

and on “make” i get the following error:

make[2]: Verzeichnis „/home/pi/dev/seafile-6.2.9/lib“ wird betreten
[libsearpc]: generating rpc header files
/usr/bin/python `which` ../lib/
loaded func_table from /home/pi/dev/seafile-6.2.9/lib/rpc_table.pyc
Traceback (most recent call last):
  File "/usr/bin/", line 190, in <module>
  File "/usr/bin/", line 106, in gen_marshal_functions
    print >>f, generate_marshal(item[0], item[1])
  File "/usr/bin/", line 65, in generate_marshal
    ret_type_item = type_table[ret_type]
KeyError: 'json'
Makefile:822: die Regel für Ziel „rpc_table.stamp“ scheiterte

can anyone help me with any of those solutions?

Maybe @schlarbm could have an advice.

Sadly he couldn’t help me when i asked last time.

Ah okay. Maybe try it with a newer python & libs version from buster first. I guess it’s caused by debian’s old python version.

Ironically i was always able to compile seaf-cli on jessie. If it doesn’t work with stretch but again with buster it would be really weird.
Sadly the manual is still based on Ubuntu 14.04 which will be EOL in a few months…

Some time has passed since the last time and there were lots of updates to the Seafile client packages in buster and stretch-backports (they are all 6.2.9/3.1.0). Maybe you can try those packages again.

I have no idea what goes wrong when you try to compile it yourself, but I don’t see such build errors

1 Like

thanks for your help - i will try it again this evening!

I’d say it worked for me:

$ apt install -t stretch-backports seafile-cli
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
   libjsoncpp0 (0.6.0~rc2-3.1)
   libmicrohttpd10 (0.9.37+dfsg-1+b1)
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
   libjansson4 (2.9-1)
   libsearpc1 (3.1.0-3~bpo9+2)
   python-seafile (6.2.9-1~bpo9+1)
   python-searpc (3.1.0-3~bpo9+2)
   seafile-daemon (6.2.9-1~bpo9+1)
The following NEW packages will be installed:
   libjansson4 (2.9-1)
   libsearpc1 (3.1.0-3~bpo9+2)
   python-seafile (6.2.9-1~bpo9+1)
   python-searpc (3.1.0-3~bpo9+2)
   seafile-cli (6.2.9-1~bpo9+1)
   seafile-daemon (6.2.9-1~bpo9+1)
$ mkdir blub
$ seaf-cli init -d blub
Writen seafile data directory ~/blub/seafile-data to ~/.ccnet/seafile.ini

Thank you @schlarbm!
with seafile-cli 6.2.9-1~bpo9+1 from backports init works. Soon i’ll try to sync…

It seems i was to early to happy…

pi@rpi:~ $ seaf-cli start
New device id created
Starting seafile daemon ...
Failed to start seafile daemon

now ~/.ccnet is created…

pi@rpi:~ $ cd .ccnet/
pi@rpi:~/.ccnet $ ls
logs  seafile.ini

…but i still have no file in the logs folder :confused:
maybe a bad question, but were you able to start seaf-cli also - not just to init it?

Ha - no I did not try that - sorry.

If you try to start seaf-daemon by hand, you’ll propably too see an “Illegal Instruction” error…
So it seems that what Debian targets as the armhf platform is something different than what our Pis have and what Raspbian supports. So mixing the repositories from Raspbian and Debian Backports doesn’t seem like a good idea…

E.g. I get:

$ readelf -A $(which seaf-daemon) | grep CPU
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_CPU_unaligned_access: v6
$ grep model /proc/cpuinfo 
model name	: ARMv6-compatible processor rev 7 (v6l)

In principal, you should be able to compile the Debian packages on the Pi by yourself (e.g. using something like apt-get source --compile seafile) to work around that problem locally…

Thank you for your help and that hint. I tried to do this with the help of this Tutorial:

The step where i try to install the dependencies failed:

pi@rpi:~/src/debian/seafile-6.2.9 $ sudo apt-get build-dep seafile-cli
Paketlisten werden gelesen... Fertig
Als Quellpaket wird »seafile« statt »seafile-cli« gewählt.
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.
Statusinformationen werden eingelesen.... Fertig
Einige Pakete konnten nicht installiert werden. Das kann bedeuten, dass
Sie eine unmögliche Situation angefordert haben oder, wenn Sie die
Unstable-Distribution verwenden, dass einige erforderliche Pakete noch
nicht erstellt wurden oder Incoming noch nicht verlassen haben.
Die folgenden Informationen helfen Ihnen vielleicht, die Situation zu lösen:

Die folgenden Pakete haben unerfüllte Abhängigkeiten:
 builddeps:seafile : Hängt ab von: libsearpc-dev (>= 3.1.0) aber 3.0.8-1 soll installiert werden
E: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.

For the non German people: It seems that the package requires libsearpc-dev in Version >= 3.1.0 - but only 3.0.8-1 seems to be available.
So i installed the latest version (3.0.8-1) via sudo apt install libsearpc-dev.
In the file ~/src/debian/seafile-6.2.9/debian/control i changed the dependencies of libsearpc-dev also to the latest available.(not sure if this step is really necessary)
After that i tried to build the package again with debuild -b -uc -us but i got some errors that there were still some dependencies missing. I installed them via sudo apt install . And after that - i was able to compile seafile-cli via debuild -b -uc -us. (that took a long time…)
…but it seemed to work:

pi@rpi:~/src/debian $ ls
libseafile0_6.2.9-1~bpo9+1_armhf.deb      seafile_6.2.9.orig.tar.gz
libseafile0-dbgsym_6.2.9-1~bpo9+1_armhf.deb  seafile_6.2.9-1~bpo9+1_armhf.buildinfo  seafile-cli_6.2.9-1~bpo9+1_all.deb
libseafile-dev_6.2.9-1~bpo9+1_armhf.deb      seafile_6.2.9-1~bpo9+1_armhf.changes    seafile-daemon_6.2.9-1~bpo9+1_armhf.deb
python-seafile_6.2.9-1~bpo9+1_all.deb        seafile_6.2.9-1~bpo9+1.debian.tar.xz    seafile-daemon-dbgsym_6.2.9-1~bpo9+1_armhf.deb
seafile-6.2.9                                seafile_6.2.9-1~bpo9+1.dsc

i tried to install seafile-cli but it didn’t work out directly:

pi@raspberrypilivingroom:~/src/debian $ sudo dpkg -i seafile-cli_6.2.9-1~bpo9+1_all.deb
Vormals nicht ausgewähltes Paket seafile-cli wird gewählt.
(Lese Datenbank ... 70490 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von seafile-cli_6.2.9-1~bpo9+1_all.deb ...
Entpacken von seafile-cli (6.2.9-1~bpo9+1) ...
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von seafile-cli:
 seafile-cli hängt ab von seafile-daemon (>= 6.2.9-1~bpo9+1); aber:
  Paket seafile-daemon ist nicht installiert.
 seafile-cli hängt ab von python-seafile (>= 6.2.9-1~bpo9+1); aber:
  Paket python-seafile ist nicht installiert.

dpkg: Fehler beim Bearbeiten des Paketes seafile-cli (--install):
 Abhängigkeitsprobleme - verbleibt unkonfiguriert
Trigger für man-db ( werden verarbeitet ...
Fehler traten auf beim Bearbeiten von:

But after i installed seafile-daemon and python-seafile via sudo dpkg -i it worked. at least it installed. On init i failed again:

pi@raspberrypilivingroom:~ $ seaf-cli init -d seaf-cli
Traceback (most recent call last):
  File "/usr/bin/seaf-cli", line 99, in <module>
    import seafile
  File "/usr/lib/python2.7/dist-packages/seafile/", line 2, in <module>
    from rpcclient import SeafileRpcClient as RpcClient
  File "/usr/lib/python2.7/dist-packages/seafile/", line 1, in <module>
    from pysearpc import searpc_func, SearpcError, NamedPipeClient
ImportError: cannot import name NamedPipeClient

Before that evening in never thought that i will one day try to compile and change debian source packages by myself - but with your help @schlarbm and the posted tutorial it was easier than thought - even there were some difficulties. So i am optimistic that also now someone can help me - i’d like to sync :slight_smile:

Hi @Thynir, have you compiled yourself or used the Version from @mindcont (Install Seafile-cli client on Raspberry Pi) ?

Sorry, I forgot to answer on friday:

You really need libsearpc >= 3.1 (it doesn’t work with 3.0.8) - so as the first step you need to compile that yourself, too!

(Also, you can run export LC_ALL=C before you run anything to get non-localized output for international audiences. :wink: )

So, the 6.1.1 packages from @mindcont seem to work. I donloaded them, installed them (not the graphical client) via sudo sudo dpkg -i and init worked without problems. But i again had problems with the start:

pi@rpi:~ $ seaf-cli init -d seaf-cli
Successly create configuration dir /home/pi/.ccnet.
Writen seafile data directory /home/pi/seaf-cli/seafile-data to /home/pi/.ccnet/seafile.ini
pi@rpi:~ $ seaf-cli start
Starting ccnet daemon ...
Started: ccnet daemon ...
Starting seafile daemon ...
seaf-daemon: error while loading shared libraries: cannot open shared object file: No such file or directory
Failed to start seafile daemon

After searching for “seaf-daemon: error while loading shared libraries:” i found on Github the Solution: sudo ldconfig

After that seems to work for now:

pi@rpi:~ $ sudo ldconfig
pi@rpi:~ $ seaf-cli start
Starting ccnet daemon ...
Started: ccnet daemon ...
Starting seafile daemon ...
Started: seafile daemon ...

@schlarbm & @Thynir thanks for your hints. Maybe i’ll try it again with compiling in the next days - but maybe not if 6.1.1 works properly.