# OpenJabNab still does not recognize libcommon.so



## mohataj (Sep 12, 2011)

OpenJabNab still does not recognize libcommon.so after compilation.
Both GIT sources produce the same error. (https://github.com/OpenJabNab/OpenJabNab and https://github.com/Pixel166/OpenJabNab)

Relinking libcommon.so to <devel>/lib or running openjabnab directly from <devel>/bin produces the same error.
libcommon.so et al is located in <devel>/bin.

What can I do?

Compilation is without errors - see logfile.

```
[mo@Server /Fileserver/Development/OpenJabNab/server]$ ./bin/openjabnab 
/libexec/ld-elf.so.1: Shared object "libcommon.so.1" not found, required by "openjabnab"
[mo@Server /Fileserver/Development/OpenJabNab/server]$ cd bin/
[mo@Server /Fileserver/Development/OpenJabNab/server/bin]$ ./openjabnab 
/libexec/ld-elf.so.1: Shared object "libcommon.so.1" not found, required by "openjabnab"
[mo@Server /Fileserver/Development/OpenJabNab/server/bin]$ ls
libcommon.so       libcommon.so.1     libcommon.so.1.0   libcommon.so.1.0.0 openjabnab         plugins            tts
[mo@Server /Fileserver/Development/OpenJabNab/server/bin]$ ls -lah
total 845
drwxr-xr-x  4 mo  nobody     9B 12 Sep 20:05 .
drwxr-xr-x  7 mo  nobody    12B 12 Sep 19:56 ..
lrwxr-xr-x  1 mo  nobody    18B 12 Sep 19:59 libcommon.so -> libcommon.so.1.0.0
lrwxr-xr-x  1 mo  nobody    18B 12 Sep 19:59 libcommon.so.1 -> libcommon.so.1.0.0
lrwxr-xr-x  1 mo  nobody    18B 12 Sep 19:59 libcommon.so.1.0 -> libcommon.so.1.0.0
-rwxr-xr-x  1 mo  nobody   668K 12 Sep 19:59 libcommon.so.1.0.0
-rwxr-xr-x  1 mo  nobody    66K 12 Sep 19:59 openjabnab
drwxr-xr-x  2 mo  nobody    27B 12 Sep 20:05 plugins
drwxr-xr-x  2 mo  nobody     4B 12 Sep 20:05 tts
[mo@Server /Fileserver/Development/OpenJabNab/server/bin]$
```


----------



## jdn06 (Feb 19, 2012)

Late answer, but it's better than never.
RedoX (dev of OJN) solved this for me last summer. To launch the bin, you have to put a

```
setenv LD_LIBRARY_PATH /path-to-the-libcommon.so
```

I was thinking I was the only one to have a OpenJabNab FreeBSD server! Now, I feel less lonely.

I have adapted a launcher in /usr/local/etc/rc.d to start the bin at boot with simple user rights (user "jd" in my script) and not as root. You will have to adjust paths to your config. I put it here if it can help:


```
#!/bin/sh
#
# PROVIDE: OpenJabNab
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
#
# openjabnab_enable (bool):   Set to NO by default.
#                Set it to YES to enable OpenJabNab

. /etc/rc.subr

name="openjabnab"
rcvar=`set_rcvar`

load_rc_config $name

openjabnab=${openjabnab_enable-"NO"}

start_cmd="openjabnab_cmd"
stop_cmd="killall openjabnab"
restart_cmd="$stop_cmd; $start_cmd"

openjabnab_cmd()
{

	su jd -c 'setenv LD_LIBRARY_PATH /usr/local/openjabnab-bin && cd /usr/local/openjabnab-bin/ && ./openjabnab &'
}

run_rc_command "$1"
```


----------

