I wrote a shell script to run svn, as following:
#! /bin/sh
cd /data/tmpsvn/
export LC_ALL=zh_CN.utf8
date "+getSvn - [%Y-%m-%d %T]" >>svn.log 2>&1
/usr/local/bin/svn checkout http://IP >> svn.log 2>&1
Then I wrote a crontab:
*/5 * * * * sh /data/htdocs/zlbz-test/tools/get_svn_all.sh 1>/dev/null 2>&1
Some errors occur like this shown in log file:
getSvn - [2015-05-12 14:40:01]
/usr/local/bin/svn: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory
but when I execute this command in terminal, it work well.
Can any people explain what has happened?
It's been solve according to Vadim Landa's link in the comment. I added a line in the script:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/openssl/lib/