I am using rubystack-1.9.3-10 on Mac OS X Mountain Lion. If I run the command:
java -version
within rubystack I get:
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06-451-11M4406)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01-451, mixed mode)
But when I execute the command through php, I get:
Unable to load native library: libjava.jnilib
I tried the following solutions:
http://stackoverflow.com/questions/1482450/broken-java-mac-10-6
http://stackoverflow.com/questions/7650013/java-1-6-broken-when-called-by-background-symfony-task
but was unable to resolve the issue.
For the first solution, I did:
unset DYLD_LIBRARY_PATH
But I still got the same error.
For the second solution, I commented out:
DYLD_LIBRARY_PATH=""
export DYLD_LIBRARY_PATH
in scripts/setenv.sh but get the following error:
dyld: Library not loaded: /bitnami/rubystack-osx-x64/output/common/lib/libmcrypt.4.dylib
Referenced from: /rubystack/php/bin/php.bin
Reason: image not found
Trace/BPT trap: 5