It seems i owe you an apology, it is the same as Fr0gsteR's problem. He/she posted a fix on the other topic.
The question is why the server can't find /usr/lib/libtdsodbc.so.0 as it should get installed automatically when installing freetds. Where does the file exist on your server? Also, you are running cabal_config.sh from /home/cabal and not root/ep2/home/cabal?