Posts Tagged ‘ldconfig’

Missing shared libs?

No Comments »

I had an issue today while attempting to move an SQL Anywhere installation to a new server. As always, the easiest thing to do on a linux box is to copy over all data/directories, configuration, etc. as is.

After doing so and then attempting to start the service on the new box, I was continually met with this error — even though I verified repeatedly that the shared lib file indeed existed:

[root@testDB01 lib64]# /etc/init.d/############### start                                                                                                                                                                                                                       
iAnywhere Solutions, Inc. One Sybase Drive, Dublin, CA 94568, USA
Copyright (c) 2001-2011, iAnywhere Solutions, Inc. Portions copyright (c) 
1988-2011, Sybase, Inc. All rights reserved. All unpublished rights reserved.

Starting DB: cetixV3_SFV3_seating
/opt/sqlanywhere12/bin64/dbsrv12 -ud -gk all -c 64M -x tcpip{SERVERPORT=8204} -n ############### /database/########/#########.db -o /database/############/########.log -os 50M
/opt/sqlanywhere12/bin64/dbsrv12: error while loading shared libraries: libdbserv12_r.so: cannot open shared object file: No such file or directory

I was finally able to sort it out, thanks to this post I found after a google search.

The problem turned out to be that I did not have the library directory in /etc/ld.so.conf or /etc/ld.so.conf.d/*.conf. So, I created /etc/ld.so.conf.d/sqlanywhere.conf, and added the location of the shared library files, then ran “ldconfig”.

[root@testDB01 ~]# cat /etc/ld.so.conf.d/sqlanywhere.conf 
/opt/sqlanywhere12/lib32
/opt/sqlanywhere12/lib64

Simple as that!