> ## Content Index
> Fetch the complete content index at: https://ostreff.info/llms.txt
> Use this file to discover other available public pages before exploring further.

# ELF binary type "0" not known.
- URL: https://ostreff.info/elf-binary-type-0-not-known/
- Published: 2021-02-13T20:13:36.000Z
- Updated: 2021-02-13T21:05:25.000Z
- Author: Jordan Ostreff
- Tags: FreeBSD

Today I've invested some time to bring back to life my personal [Cloud storage](https://cloud.ostreff.info/?ref=ostreff.info). The reason for his death was upgrade to [PHP8](https://www.php.net/releases/8.0/en.php?ref=ostreff.info). So after some research I've found that at this moment the only compatible to that php version was [NextCloud 21](https://nextcloud.com/install/?ref=ostreff.info). I have made an quick migration from ownCloud to NextCloud 21 ( [RC2](https://github.com/nextcloud/server/milestone/120?ref=ostreff.info) ), till next ownCloud [release](https://owncloud.github.io/ocis/release%5Froadmap/?ref=ostreff.info).

I have been surprised that ownCloud are not talking for php8 compatibility - so latter you will fid the reason for this ...

Check the downloaded file what kind is:

$ file ocis  
ocis: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, Go BuildID=Q1QARbCPb-T4jvNx\_o5P/\_h2AG0yzdDeW\_AGAAQUy/xF9-8aLfT93eA51lKJg7/fnNkWegdotRsUI2zrKyc, stripped

When I executed it **starnge** error is showing:

$ ./ocis -h  
ELF binary type "0" not known.  
\-sh: ./ocis: Exec format error

I have checked that linux emulation modules are up and running in kernel space:

$ kldstat  
Id Refs Address Size Name  
1 65 0xffffffff80200000 228e368 kernel  
2 1 0xffffffff82490000 a938 cuse.ko  
3 1 0xffffffff8249b000 ff18 carp.ko  
4 1 0xffffffff824ab000 2ba0 coretemp.ko  
5 1 0xffffffff824ae000 3be278 zfs.ko  
6 2 0xffffffff8286d000 a468 opensolaris.ko  
7 1 0xffffffff836fa000 5688 linprocfs.ko  
**8 4 0xffffffff83700000 4bb0 linux\_common.ko**  
9 1 0xffffffff83705000 1f3c linsysfs.ko  
10 1 0xffffffff83707000 8b30 tmpfs.ko  
11 1 0xffffffff83710000 2130 acpi\_wmi.ko  
12 1 0xffffffff83713000 4240 ng\_ubt.ko  
13 6 0xffffffff83718000 9b60 netgraph.ko  
14 2 0xffffffff83722000 90f8 ng\_hci.ko  
15 3 0xffffffff8372c000 9b0 ng\_bluetooth.ko  
16 1 0xffffffff8372d000 cae0 ng\_l2cap.ko  
17 1 0xffffffff8373a000 1aef0 ng\_btsocket.ko  
18 1 0xffffffff83755000 2140 ng\_socket.ko  
19 1 0xffffffff83758000 25650 ipfw.ko  
20 1 0xffffffff8377e000 acf mac\_ntpd.ko  
**21 1 0xffffffff8377f000 35e60 linux64.ko** 
**22 1 0xffffffff837b5000 3c670 linux.ko**

I have checked what kind of ELF applications are available for execution in that kernel:

$ **brandelf -l**  
known ELF types are: FreeBSD(9) **Linux(3)** Solaris(6) SVR4(0)

It looks that we must tell to FreeBSD that this "ocis" file is Linux kind ELF binary. To do this I used command:

$ **brandelf -t Linux ocis**

And now our example application is runing as we expected:

$ ./ocis -h  
Incorrect Usage. flag: help requested

NAME:  
ocis - ownCloud Infinite Scale Stack

USAGE:  
ocis \[global options\] command \[command options\] \[arguments...\]

VERSION:  
1.1.0

AUTHOR:  
ownCloud GmbH [support@owncloud.com](mailto:support@owncloud.com)

In my example I have used linux application named "ocis". In fact this is application from excelent [ownCloud](https://owncloud.com/?ref=ostreff.info) platform - it is part from their next generation cloud platform named "**[ownCloud Infinite Scale](https://owncloud.com/beta-testing/?ref=ostreff.info)**". I believe that this will be **better** version for "Cloud Platform" from performance, scalability and security perspective. The next "Infine Scale" version as it is visible from file information is written on [go language](https://golang.org/?ref=ostreff.info). 

I hope that "ownCloud GmbH" will respect users not only in linux world - they are currently providing precompiled binaries only for linux and also docker images. But as you know actually there are also many other great UNIXes like BSD clones ([Free](https://www.freebsd.org/?ref=ostreff.info)/[Net](https://www.netbsd.org/?ref=ostreff.info)/[Open](https://www.openbsd.org/?ref=ostreff.info) BSD), Solaris ( [Oracle](https://www.oracle.com/solaris/solaris11/?ref=ostreff.info), [illumos](https://illumos.org/?ref=ostreff.info), [openindiana](https://www.openindiana.org/?ref=ostreff.info) ).