2

I am trying to run an executable on a linux machine that I made in a linux virtual machine on my mac. To download the program and all the corresponding dependencies etc. I am using Docker. To execute the program I am running a python2.7 script.

Every time I try to run the program, emotion-processing, I get the following error:

emotion-processing: error while loading shared libraries: libaffdex-native.so: cannot open shared object file: No such file or directory

I set everything up in my Docker .worker file as so:

RUN apt-get install -y --no-install-recommends libopencv-dev libcurl4-openssl-dev uuid-dev
RUN mkdir $HOME/affdex-sdk
RUN wget https://download.affectiva.com/linux/affdex-cpp-sdk-3.2-20-ubuntu-xenial-xerus-64bit.tar.gz
RUN tar -xzvf affdex-cpp-sdk-3.2-20-ubuntu-xenial-xerus-64bit.tar.gz -C $HOME/affdex-sdk
RUN wget https://github.com/path/to/emotion-processing?raw=true
RUN mv emotion-processing?raw=true /usr/local/bin/emotion-processing
RUN chmod +x /usr/local/bin/emotion-processing

I then set an environment variable to the grandparent folder of the missing library.

ENV AFFECTIVA_SDK_FOLDER="$HOME/affdex-sdk"

After that, in my a python2.7 file, I concatenate "/lib" onto AFFECTIVA_SDK_FOLDER.

affdex_sdk_lib_folder = os.environ.get("AFFECTIVA_SDK_FOLDER") + "/lib"

Then, I tell the program where the library is right before execution.

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$HOME/affdex-sdk/lib" emotion-processing

I got this idea by looking at this stack overflow post. But alas, setting the LD_LIBRARY_PATH in any number of ways doesn't seem to work. I have been looking at other posts on here, but nothing seems to solve the problem. I am trying to avoid recompilation.

Thank you in advance for your thoughts and advice.

peachykeen
  • 4,143
  • 4
  • 30
  • 49

0 Answers0