shared lib libmwi18n.so not find

3.5k views Asked by At

I saw a similar question here

After reading the answers and comment in the above link I located the 'libmwi18n.so' file and set the LD_LIBRRY_PATH, but I'm still getting this error:

'error while loading shared libraries: libmwi18n.so: cannot
 open shared object file: No such file or directory'

I did the following:

locate libmwil8n.so

which gives output

/usr/local/MATLAB/R2012a/bin/glnx86/libmwi18n.so

Then I did

export LD_LIBRARY_PATH= /usr/local/MATLAB/R2012a/bin/glnx86

and ran the shell program again,

./run_app.sh

which returns the same error.

Please help me , how can I solve this problem?

Update-

content of the run_spp.sh

!/bin/sh
# script for execution of deployed applications
#
# Sets up the MCR environment for the current $ARCH and executes 
# the specified command.
#
exe_name=$0
exe_dir=`dirname "$0"`
echo "------------------------------------------"
if [ "x$1" = "x" ]; then
  echo Usage:
  echo    $0 \<deployedMCRroot\> args
else
  echo Setting up environment variables
  MCRROOT="$1"
  echo ---
  LD_LIBRARY_PATH=.:${MCRROOT}/runtime/glnx86 ;
  LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRROOT}/bin/glnx86 ;
  LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRROOT}/sys/os/glnx86;
        MCRJRE=${MCRROOT}/sys/java/jre/glnx86/jre/lib/i386 ;
        LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRJRE}/native_threads ;
        LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRJRE}/server ;
        LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRJRE}/client ;
        LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRJRE} ;
  XAPPLRESDIR=${MCRROOT}/X11/app-defaults ;
  export LD_LIBRARY_PATH;
  export XAPPLRESDIR;
 echo LD_LIBRARY_PATH is ${LD_LIBRARY_PATH};
  shift 1
  args=
  while [ $# -gt 0 ]; do
      token=`echo "$1" | sed 's/ /\\\\ /g'`   # Add blackslash before each blank
      args="${args} ${token}"
      shift
  done
  "${exe_dir}"/b $args
fi
exit
2

There are 2 answers

4
Bonlenfum On BEST ANSWER

Your LD_LIBRARY_PATH should not include the library itself, but rather, the path that contains the library. Try:

export LD_LIBRARY_PATH=/usr/local/MATLAB/R2012a/bin/glnx86

or perhaps appending this location to the path:

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/MATLAB/R2012a/bin/glnx86

EDIT: (after more info on question provided)

The shell script run_app.sh sets up it's own library path, using the environment variable LD_LIBRARY_PATH (it is declared in lines 17--24, and overwritten in line 26). This means that anything that is set in your shell before executing the script will be overwritten.

To include the path for libmwi18n.so, append the path within the script, after line 17 and before line 26, with:

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/MATLAB/R2012a/bin/glnx86

(Note: there is also a printout of the LD path so you should be able to tell whether the glnx86 path is present or not).

2
Sam Roberts On

I think you want glnx86, not glnx68.

Apologies if that was just a typo in your question.