cannot open shared object file: Permission denied

1,269 views
Skip to first unread message

paul89...@speech.cm.nctu.edu.tw

unread,
Nov 5, 2015, 10:27:48 PM11/5/15
to kaldi-help
Hello, every one.
I installed dynamic Kaldi successfully but I get error now:

~/tcc300$ compute-mfcc-feats
compute-mfcc-feats: error while loading shared libraries: /root/kaldi-trunk/tools/ATLAS/build/install/lib/libsatlas.so: cannot open shared object file: Permission denied

My Kaldi was built in the /root directory at first. When I installed successfully, I copy one to the "/usr/local".
The error seems that it can not search the "libsatlas.so" successfully because of permission of "/root".
I have set LD_LIBRARY_PATH by typing "export LD_LIBRARY_PATH=usr/local/kaldi-trunk/src/lib/:usr/local/kaldi-trunk/tools/openfst/lib/:usr/local/kaldi-trunk/tools/ATLAS/build/lib:$LD_LIBRARY_PATH".
But it still search in the "/root/kaldi-trunk/tools/ATLAS/build/install/lib" instead of "/usr/local/kaldi-trunk/tools/ATLAS/build/install/lib".
Thank you so much : )

Jan Trmal

unread,
Nov 5, 2015, 10:33:38 PM11/5/15
to kaldi-help

You might probably fix this  by having proper path names  in the LD_LIBRARY_PATH  (append  / to each  of the absolute  paths).

Y.

--
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jan Trmal

unread,
Nov 5, 2015, 10:47:29 PM11/5/15
to kaldi-help

I wasn't clear,  sorry.
Instead of


LD_LIBRARY_PATH=usr/local/kaldi-trunk/src/lib/:usr/local/kaldi-trunk/tools/openfst/lib/:usr/local/kaldi-trunk/tools/ATLAS/build/lib:$LD_LIBRARY_PATH".

You should have
LD_LIBRARY_PATH=/usr/local/kaldi-trunk/src/lib/:/usr/local/kaldi-trunk/tools/openfst/lib/:/usr/local/kaldi-trunk/tools/ATLAS/build/lib:$LD_LIBRARY_PATH"
(notice the slashes)
Y.

paul89...@speech.cm.nctu.edu.tw

unread,
Nov 5, 2015, 11:48:54 PM11/5/15
to kaldi-help
Sorry, I missed the slashes when asking the above problem, but I had slashes in fact.
I have "export KALDI_ROOT=/usr/local/kaldi-trunk"
"export LD_LIBRARY_PATH=$KALDI_ROOT/src/lib/:$KALDI_ROOT/tools/openfst/lib/:$KALDI_ROOT/tools/ATLAS/build/lib"
But still get same error.
Thank you : )

Yenda於 2015年11月6日星期五 UTC+8上午11時47分29秒寫道:

Daniel Povey

unread,
Nov 6, 2015, 12:05:52 AM11/6/15
to kaldi-help
Kaldi binaries have the path directories to look for various libraries, stored in the binary itself using the -rpath linking option.  So if you compile in one place and them move, it can be looking in the wrong place for libraries.  It should be possible to work around this by changing the LD_LIBRARY_PATH.  If you can't figure out how, recompiling in the location you want to use it may be the best option.
Dan

paul89...@speech.cm.nctu.edu.tw

unread,
Nov 9, 2015, 7:43:30 AM11/9/15
to kaldi-help, dpo...@gmail.com
I solve the problem by re-compile ATLAS and Kaldi in "/usr/local".
Thanks all. 
: )


Dan Povey於 2015年11月6日星期五 UTC+8下午1時05分52秒寫道:

Sean True

unread,
Nov 15, 2015, 3:56:53 PM11/15/15
to kaldi...@googlegroups.com, paul89...@speech.cm.nctu.edu.tw
I've worked around the rpath issue that Dan describes by collecting the kaldi binaries, supporting tools binaries, and supporting shared libraries in a single directory and rewriting the executable rpaths to resolve to that directory. It's solid for Ubuntu 14.04 (and probably other Linux-es), and I have started something similar for OS/X. 

-- Sean
Reply all
Reply to author
Forward
0 new messages