Hi! I'm reasonably new to node-red, but really love it. I've run into a problem I'm unsure of how to solve.
In the Exec node I am trying to run a shell script, except I am having problems with a path for a dependency.
My shell script invokes an AWS Video Kinesis producer to capture video on my RPi and send it to AWS. Cool - my command works fine from the terminal.
When I run the same command in the Exec node, I get an erroneous pipeline error for kvssink - which is part of the Kinesis video producer. To get this to work regularly, I set my path for the library dependencies in /etc/profile.d/env.sh
I'm betting node-red needs me to set the path somewhere to these libraries in settings.js somewhere. But would really appreciate some direction.
Oh - and I have the Exec node configured right - because I can trigger other shell scripts that don't have any dependencies.
Any suggestions or direction is much appreciated - and thank you all in advance.
In the exec node try LD_LIBRARY_PATH="$PATH:/home/pi/amazon-kinesis-video-streams-producer-sdk-cpp/open-source/local/lib" /path/to/ script
That sets the env var and runs the script. Though I am not sure about the $PATH bit. Put an echo of the lib path in the script to see if it is working. You might need to put the full path in explicitly.
Great suggestion! Thank you so much. I don't know why I didn't think of that. I just added it to the top of my script and it worked just fine. Perfect. Just what I needed.
In the event that anyone else needs this solution, my shell script has the following at the top: