LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-22-2007, 07:48 AM   #1
sirish
LQ Newbie
 
Registered: Mar 2007
Posts: 2

Rep: Reputation: 0
Cannot open shared object file : Issue with permissions?


Hi,
I am stuck on this seemingly trivial problem
since some time.

Here's what i have

Code:
- Red Hat Enterprise Linux Advanced Server 4 Upgrade 3

- Matlab Component runtime v 75 (this is the runtime for executing the ctf and jar files generated by MATLAB. I am using MATLAB builder for java. There is no issue with this software by the looks of it.I feel it has to do with the path settings)

Now for testing, there is a java program "Hello" that basically invokes a method (written in MATLAB and present in the jar file hellomatlab.jar).
I tried to execute this using the following script


Code:
export CLASSPATH=/root/v75/toolbox/javabuilder/jar/javabuilder.jar:/root/Hello/hellomatlab.jar:.

export LD_LIBRARY_PATH=/root/v75/sys/os/glnxa64:/root/v75/bin/glnxa64:/root/v75/extern/lib/glnxa64:/root/v75/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/native_threads:/root/v75/sys/java/jre/glnxa64/jre1.5.0/lib/amd64/server:/root/v75/sys/java/jre/glnxa64/jre1.5.0/lib/amd64

export XAPPLRESDIR=/root/v75/X11/app-defaults


/usr/java/jre1.6.0/bin/java -Djava.library.path=$LD_LIBRARY_PATH Hello

The MCR is installed at /root/v75. As per the documentation in MCR, we need to update an environment variable called LD_LIBRARY_PATH to include the required .so

As you can see, I have passed the LD_LIBRARY_PATH when invoking java.exe

Upon execution I am facing the following error


Code:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /root/v75/bin/glnxa64/libnativemcl75.so: /root/v75/bin/glnxa64/libnativemcl75.so: cannot open shared object file: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(Unknown Source)
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at com.mathworks.toolbox.javabuilder.MWMCR.<clinit>(MWMCR.java:18)
        at hellomatlab.hellomatlabclass.<init>(hellomatlabclass.java:48)
        at Hello.main(Hello.java:21)

What the output means is that during execution, when an attempt is made to invoke the function in MATLAB (located in hellomatlab.jar), an attempt is being made to access libnativemcl75.so. This file is present at the required location (with permission set to 777). However i am still running into issues

Any inputs on this one?
Thanks for you help
Sirish

Last edited by Tinkster; 03-23-2007 at 03:05 PM. Reason: mod_edit ... eye-sore removal, introduction of code tags
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libstdc++.so.5: cannot open shared object file: Franziss Linux - Newbie 10 06-28-2010 06:47 AM
error while loading shared libraries: libgvc.so.3: cannot open shared object file coolrock Slackware 6 01-17-2007 06:10 PM
libcurses.so.5: cannot open shared object file ceenu99 Linux - Software 1 08-26-2005 02:03 PM
cannot open shared object file barells Linux - Software 2 07-16-2005 08:53 AM
error while loading shared libraries: libdb-4.1.so: cannot open shared object file putquery8581 Linux - Software 1 10-01-2004 08:03 AM


All times are GMT -5. The time now is 04:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration