Posts Tagged ‘linux’

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!


My tmux configuration

No Comments »

Not much to this post, just wanted to add my tmux.conf file so that I can easily access it — mainly in cases where I’ve installed tmux on a new box.

Basically it uses ctrl+a for getting around just as in screen.  It also has huge history buffers, turns mouse mode off, and makes some formatting changes.

unbind C-b
set -g prefix C-a

# Paste buffer stuffs
setw -g mode-mouse off
set -g buffer-limit 100000
set -g history-limit 100000

#status row colors
set -g status-bg black
set -g status-fg green
set-window-option -g window-status-current-bg green
set-window-option -g window-status-current-fg black

#Time in bottom right
set-option -g status-right '#[fg=green]%H:%M %p %A %B %d, %Y'

#move around windows with arrow keys
bind-key -n "C-Left" select-window -t :-
bind-key -n "C-Right" select-window -t :+# Paste buffer stuffs

Add timestamps to dmesg

No Comments »

Had this issue come up at work recently.  We were troubleshooting a database & SAN issue, and desperately needed timestamps added to dmesg.  Finally found this helpful post on Arch Linux’s forums, much thanks to user “begray”.

To have timestamps added to dmesg entries, add the following parameter to your boot options:

printk.time=1

Sadly, that didn’t help us in our situation (as we would have needed to reboot, nixing dmesg in our case), however it’s good to know for future treks. 🙂