First of all, I must say I'm not very comfortable with UNIX commands, shell language etc. I'm willing to install Google library SentencePiece (> https://github.com/google/sentencepiece), which is a dependency of a fairseq script to preprocess some speech data. I followed installation procedure as stated in the README.md from the git repo.
I do not have root privileges, hence I couldn't install it the precognized way with cmake (meaning in /etc), and I had to install it in a custom directory.
For the same reasons, as I do not have root privileges nor access to /etc directory, I couldn't execute the last line : sudo ldconfig -v
. Trying the execution without sudo obviously returned a permission error.
And now, if I try to call a function from SentencePiece, I get an error :
spm_train: error while loading shared libraries: libsentencepiece_train.so.0: cannot open shared object file: No such file or directory
I understand it comes from the fact that I did not build any link between thoses dependencies (and the executable file ?) as I couldn't execute ldconfig
, hence I do not know if I should call it with a specified path pointing to my customized directory (hence not needing root privileges as not needing access to /etc ?) or if I need to use another command ? In both cases, I don't know how to do it.
Thanks in advance for your help !
Running ldconfig -n path/to/shared/libs
and export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/shared/libs
seems to solve my problem !