Environment: Mandriva 2006
Installed via RPM
Launching via “service wildfired start” as root.
/etc/init.d/wildfired has all defaults (WILDFIRE_USER=jive)
“jive” user has been created
java is not installed anywhere else other than /opt/wildfire/jre
java works when /path/to/java -version is run as root
produces this error when service script is initiated, or java is executed after suing to user “jive”:
/opt/wildfire/jre/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
There is clearly some environment related issue that I’‘m not understanding, as making the /opt/wildfire directory chmod 777 doesn’'t affect the results.
“root” and “jive” both have default shells of /bin/bash
I’'m sudo -s to root and thus my shell in interactive session is /bin/ksh.
env as sudoed:
_=/bin/env
LC_ADDRESS=en_US
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin
LC_MESSAGES=en_US
SHELL=/bin/ksh
LC_CTYPE=en_US
LC_TIME=en_US
USER=root
LC_PAPER=en_US
DISPLAY=localhost:10.0
HOME=/domains/thomas
SUDO_GID=500
SUDO_USER=thomas
LC_IDENTIFICATION=en_US
LC_TELEPHONE=en_US
LC_SOURCED=1
LC_MONETARY=en_US
LC_COLLATE=en_US
TERM=xterm
LC_MEASUREMENT=en_US
SUDO_COMMAND=/bin/ksh
LANG=en_US
LC_NUMERIC=en_US
SUDO_UID=500
LANGUAGE=en_US:en
LC_NAME=en_US
LOGNAME=root
env as “jive”
_=/bin/env
LC_ADDRESS=en_US
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin
LC_MESSAGES=en_US
SHELL=/bin/ksh
LC_CTYPE=en_US
LC_TIME=en_US
USER=root
LC_PAPER=en_US
DISPLAY=localhost:10.0
HOME=/domains/thomas
SUDO_GID=500
SUDO_USER=thomas
LC_IDENTIFICATION=en_US
LC_TELEPHONE=en_US
LC_SOURCED=1
LC_MONETARY=en_US
LC_COLLATE=en_US
TERM=xterm
LC_MEASUREMENT=en_US
SUDO_COMMAND=/bin/ksh
LANG=en_US
LC_NUMERIC=en_US
SUDO_UID=500
LANGUAGE=en_US:en
LC_NAME=en_US
LOGNAME=root
as “jive”:
/opt/wildfire/jre/bin/java -version
/opt/wildfire/jre/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
as sudoed root:
/opt/wildfire/jre/bin/java -version
/opt/wildfire/jre/bin/java: error while loading shared libraries: libjli.so: cannot open shared object file: No such file or directory
I was actually eventually clued in by the links on this page:
http://www.linuxforums.org/forum/redhat-fedora-linux-help/90625-problem-installi ng-suns-java-fc6.html
specifically, the one to the instructions… the use of ldd on java and the differential results between the “root” and the “jive” account clued me into where the problem was… which I kind of knew already… I just didn’'t know how to tell the java binary where to look for the libraries to load.
After much playing about, I figured out that I needed to add /opt/wildfire/jre/lib and each individual sub-directory to /etc/ld.so.conf and run ldconfig -v to initialize everything properly.
Honestly, this is kind of just “monkey see, monkey do”, but a little bit better than running wildfire as the root user. If someone can clue me in on how to do this better, or more gracefully, and whether I might have borked something else, please let me know.