Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Invalid MEX-file...cannot open shared object file

73 views
Skip to first unread message

Bart

unread,
Oct 16, 2010, 1:21:03 PM10/16/10
to
Hi,

I'm trying to get the DIPimage toolbox ( http://www.diplib.org/ ) with Matlab 2010b. on Ubuntu I followed the instructions, but when trying to initialize the toolbox, I get the following error:
_____________________________________________
Initialisation of DIPlib failed. The most probable cause is incorrect
installation. Please make sure that the DIPimage distribution you
is compatible with your operating system, architecture and/or MATLAB
version. What follows is a diagnostic tool that should help debugging
your installation:

The files libdip.so, libdipio.so and libdml_mlv7_9.so must be available
on the library search path. Looking for them now:
Scanning /usr/local/MATLAB/R2010b/sys/os/glnx86
Scanning /usr/local/MATLAB/R2010b/bin/glnx86
Scanning /usr/local/MATLAB/R2010b/extern/lib/glnx86
Scanning /usr/local/MATLAB/R2010b/runtime/glnx86
Scanning /usr/local/MATLAB/R2010b/sys/java/jre/glnx86/jre/lib/i386/native_threads
Scanning /usr/local/MATLAB/R2010b/sys/java/jre/glnx86/jre/lib/i386/client
Scanning /usr/local/MATLAB/R2010b/sys/java/jre/glnx86/jre/lib/i386
Scanning /home/bart/Desktop/dip_2010/Linux/lib/
Found libdip.so
Found libdipio.so
Found libdml_mlv7_9.so

Summary of Library locations:
/home/bart/Desktop/dip_2010/Linux/lib/libdip.so (17-Mar-2010 09:46:22)
/home/bart/Desktop/dip_2010/Linux/lib/libdipio.so (17-Mar-2010 09:46:26)
/home/bart/Desktop/dip_2010/Linux/lib/libdml_mlv7_9.so (17-Mar-2010 09:46:27)
/home/bart/Desktop/dip_2010/common/mlv7_9/diplib/private/dip__initialise.mexglx (17-Mar-2010 09:46:52)

All the relevant libraries were found.

Creating a temporary file to do a ldd scan. This may provide you
with more information or, in the worst case, more information to
send to us...

linux-gate.so.1 => (0x003b1000)
libdml_mlv7_9.so => /home/bart/Desktop/dip_2010/Linux/lib/libdml_mlv7_9.so (0x007cf000)
libdipio.so => /home/bart/Desktop/dip_2010/Linux/lib/libdipio.so (0x00910000)
libdip.so => /home/bart/Desktop/dip_2010/Linux/lib/libdip.so (0x00cbe000)
libm.so.6 => /lib/libm.so.6 (0x004e4000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00a31000)
libiomp5.so => /usr/local/MATLAB/R2010b/sys/os/glnx86/libiomp5.so (0x00110000)
libgcc_s.so.1 => /usr/local/MATLAB/R2010b/sys/os/glnx86/libgcc_s.so.1 (0x0019b000)
libc.so.6 => /lib/libc.so.6 (0x0050a000)
libdl.so.2 => /lib/libdl.so.2 (0x008b0000)
/lib/ld-linux.so.2 (0x0034c000)

Finally: this is the error message generated by the low-level
initialisation function:
Invalid MEX-file '/home/bart/Desktop/dip_2010/common/mlv7_9/diplib/private/dip__initialise.mexglx': libdml_mlv7_9.so: cannot open shared object file: No such file or directory.
_____________________________________________

So as far as I can see it located all the required library's, it just can't execute/open the MEX-file. Does anyone know how to solve this?

thanks!

Bart

Vidar Vikjord

unread,
Oct 31, 2010, 9:20:04 AM10/31/10
to
I had the exact same error in Windows 7 32-bit, but found out I had installed the wrong version of DIPimage for my MATLAB version. When selecting the installation on http://www.diplib.org/download, I had selected the one for Matlab R2007a - R2009a instead of Matlab R2009b -

Uninstalling and picking the right one solved my problem.

Christian

unread,
Aug 13, 2013, 8:01:18 AM8/13/13
to
Hi,

i have the same problem!
How did you resolve it???

First he claims, that all librarys can be found and then he says invalid mex file.

I am on Matlab R2013a and Ubuntu 12.04 LTS Server Edition

frankie...@gmail.com

unread,
Aug 28, 2013, 8:45:39 AM8/28/13
to
Dne úterý, 13. srpna 2013 14:01:18 UTC+2 Christian napsal(a):
Same problem here: R2013a / Ubuntu 12.04 LTS:

Initialisation of DIPlib failed. The most probable cause is incorrect
installation. Please make sure that the DIPimage distribution you
have is compatible with your operating system, architecture and/or
MATLAB version. What follows is a diagnostic tool that should help
debugging your installation:

The files libdip.so, libdipio.so and libdml_mlv7_6.so must be available
on the library search path. Looking for them now:
Scanning /usr/local/MATLAB/R2013a/sys/os/glnxa64
Scanning /usr/local/MATLAB/R2013a/bin/glnxa64
Scanning /usr/local/MATLAB/R2013a/extern/lib/glnxa64
Scanning /usr/local/MATLAB/R2013a/runtime/glnxa64
Scanning /usr/local/MATLAB/R2013a/sys/java/jre/glnxa64/jre/lib/amd64/native_threads
Scanning /usr/local/MATLAB/R2013a/sys/java/jre/glnxa64/jre/lib/amd64/server
Scanning /usr/local/MATLAB/R2013a/sys/java/jre/glnxa64/jre/lib/amd64
Scanning /home/matyas/Dokumenty/programy/Matlab/DipImage/dip/Linuxa64/lib
Found libdip.so
Found libdipio.so
Found libdml_mlv7_6.so

Summary of Library locations:
/home/matyas/Dokumenty/programy/Matlab/DipImage/dip/Linuxa64/lib/libdip.so (02-dub-2012 14:08:47)
/home/matyas/Dokumenty/programy/Matlab/DipImage/dip/Linuxa64/lib/libdipio.so (02-dub-2012 14:08:52)
/home/matyas/Dokumenty/programy/Matlab/DipImage/dip/Linuxa64/lib/libdml_mlv7_6.so (02-dub-2012 14:08:53)
/home/matyas/Dokumenty/programy/Matlab/DipImage/dip/common/mlv7_6/diplib/private/dip__initialise.mexa64 (02-dub-2012 14:09:01)

All the relevant libraries were found.

Creating a temporary file to do a ldd scan. This may provide you
with more information or, in the worst case, more information to
send to us...

linux-vdso.so.1 => (0x00007fff157ff000)
libdml_mlv7_6.so => /home/matyas/Dokumenty/programy/Matlab/DipImage/dip/Linuxa64/lib/libdml_mlv7_6.so (0x00007ff6ea67e000)
libdipio.so => /home/matyas/Dokumenty/programy/Matlab/DipImage/dip/Linuxa64/lib/libdipio.so (0x00007ff6ea3b4000)
libdip.so => /home/matyas/Dokumenty/programy/Matlab/DipImage/dip/Linuxa64/lib/libdip.so (0x00007ff6e9f97000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff6e9c81000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff6e9a63000)
libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007ff6e9854000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff6e9495000)
libgcc_s.so.1 => /usr/local/MATLAB/R2013a/sys/os/glnxa64/libgcc_s.so.1 (0x00007ff6e927e000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff6eaa8f000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff6e9076000)

Finally: this is the error message generated by the low-level
initialisation function:
Invalid MEX-file '/home/matyas/Dokumenty/programy/Matlab/DipImage/dip/common/mlv7_6/diplib/private/dip__initialise.mexa64': libdml_mlv7_6.so: sdílený objektový soubor nelze otevřít: Adresář nebo soubor neexistuje

Michel

unread,
Oct 20, 2015, 5:03:09 AM10/20/15
to
You shouldn't use the setenv() in MATLAB, but the terminal to extend the LD_LIBRARY_PATH, i.e.:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH\:/your_path/dip/Linuxa64/lib ---- for bash
setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH\:/your_path/dip/Linuxa64/lib ---- for tcsh

This worked for me
0 new messages