My first guess is the LD_LIBRARY_PATH environment variable isn't in the environment set up by cron to run your script.
What to do:
- Determine what LD_LIBRARY_PATH is set to when logged in as a user that can successfully run the script:
- Add a line in compress_test.sh that sets LD_LIBRARY_PATH to that value (similar to the lines you already have that set environment variables.)
The LD_LIBRARY_PATH environment variable adds places to search for shared objects (also known as dynamically linked libraries).