Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
796 views
in Technique[技术] by (71.8m points)

matlab - MCR libmwi18n.so file missing

I've just installed the Matlab MCR, and I tried to run a piece of code:

./run_test.sh /usr/local/MATLAB/MATLAB_Compiler_Runtime/

And I get this error in return:

LD_LIBRARY_PATH is .:/usr/local/MATLAB/MATLAB_Compiler_Runtime//runtime/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime//bin/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime//sys/os/glnxa64:/usr/local/MATLAB/MATLAB_Compiler_Runtime//sys/java/jre/glnxa64/jre/lib/amd64/native_threads:/usr/local/MATLAB/MATLAB_Compiler_Runtime//sys/java/jre/glnxa64/jre/lib/amd64/server:/usr/local/MATLAB/MATLAB_Compiler_Runtime//sys/java/jre/glnxa64/jre/lib/amd64/client:/usr/local/MATLAB/MATLAB_Compiler_Runtime//sys/java/jre/glnxa64/jre/lib/amd64

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

Does anyone know why libmwi18n.so is missing? And how can I find it/fix this error?

EDIT: Below is the content of run_test.sh. It was compiled using MCC and is extremely basic.

#!/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/glnxa64 ;
  LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRROOT}/bin/glnxa64 ;
  LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRROOT}/sys/os/glnxa64;
        MCRJRE=${MCRROOT}/sys/java/jre/glnxa64/jre/lib/amd64 ;
        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}"/test $args
fi
exit
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

The path was not complete. The command needed to be:

./run_test.sh /usr/local/MATLAB/MATLAB_Compiler_Runtime/v717/

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...