OSError: [Errno 8] Exec format error


I’m trying to install seafile server with mysql on arch linux and I get to this point, any idea what the problem is? The line 815 is the following:

if Utils.run_argv(argv, env=env_mgr.get_binary_env()) != 0:

but I’m not sure why it fails at this line and exits the setup-seafile-mysql.py script. Any thoughts?

Press ENTER to continue, or Ctrl-C to abort

Generating ccnet configuration …

Traceback (most recent call last):
File “setup-seafile-mysql.py”, line 1471, in
File “setup-seafile-mysql.py”, line 1424, in main
File “setup-seafile-mysql.py”, line 815, in generate
if Utils.run_argv(argv, env=env_mgr.get_binary_env()) != 0:
File “setup-seafile-mysql.py”, line 85, in run_argv
File “/usr/lib/python2.7/subprocess.py”, line 390, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1025, in _execute_child
raise child_exception
OSError: [Errno 8] Exec format error


This is a common problem with Python, and usually happens when trying to directly execute a script and #!/bin/sh is not the very first line of the directly executed script or the “shebang”, as some call it, doesn’t exist at all.


So, with that being said, what version of the server are you trying to install?

Are you trying to build Seafile rather than grabbing the pre-built Seafile Server from the website? If so, what is your procedure?

I should have been more clear… I looked back at my last statement… What I’m trying to ask you is if you are trying to build it for Arch Linux. Pre-built Seafile from the web site is built for Debian, Centos, and Ubuntu. You will most likely have to build Seafile for Arch.

Also, keep in mind that you’ll need to make certain the mysql server you downloaded is compatible with Arch. If you got it from an Arch repository, it should be.


Hi - I’m trying to install 6.2.5 on arch linux ARM. I’m not building it, but using the
setup-seafile-mysql.sh file to set up mysql with seafile. After I answer all mysql questions, it starts into the .py script and that is where it fails.

I’ve tried:

  • “#!/bin/sh” as well as
  • “#!/usr/bin/env python” and
  • “#!/usr/bin/python”

at the top (without quotes) of setup-seafile-mysql.py but it still gives the same error.


This error can also be generated if you are using the wrong version of python. What version are you using?


I’m using python 2.7

I believe this is tied back to my server being ARM and seafile 32-bit executable files within the files. I ran the the “setup-seafile.sh” file and I after I answer the typical questions, I get this:

./setup-seafile.sh: line 483: /mnt/wd1000/BTSync/seafile/seafile-server-6.2.5/seafile/bin/ccnet-init: cannot execute binary file: Exec format error

$ file seafile/bin/ccnet-init
seafile/bin/ccnet-init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.18, stripped

I believe this script is called from the previous script initially noted at the start of this post. I’ve tried to build seafile from the PKGBUILD file but it gives:

==> ERROR: seafile-server is not available for the ‘arm’ architecture.

Is seafile not able to be used with ARM architecture?


Seafile is also available for ARM architectures under the category Raspberry Pi:


Have fun


That is the release I used for this and it is still giving me the error:

==> ERROR: seafile-server is not available for the ‘arm’ architecture.


Coud you please post the output of uname -a ?


Linux alarm 4.4.97-1-ARCH #1 PREEMPT Sat Nov 11 04:51:38 UTC 2017 armv5tel GNU/Linux


Please use Raspbian Lite or Debian armhf for SeaFile. Arch isn’t for Server. There are always dependeny problems with Arch and SeaFile.