Thursday 26 June 2014

how I resolved nrpe configure: error: C preprocessor /lib/cpp fails sanity check

rpm -qa | grep glibc

see all glibc installations

for example, on a problem machine I found:

glibc-2.12-1.80.el6_3.5.i686
glibc-2.12-1.80.el6_3.5.x86_64
glibc-common-2.12-1.132.el6_5.2.x86_64
glibc-devel-2.12-1.132.el6_5.2.x86_64
glibc-common-2.12-1.80.el6_3.5.x86_64
glibc-2.12-1.132.el6_5.2.x86_64

yum erase glibc\*

install headers

yum install glibc-headers.x86_64 0:2.12-1.132.el6_5.2

fixed

Wednesday 18 June 2014

Where can I download Sql Server Management Studio 2012

Microsoft didn't make it easy to find..

read the whole post before clicking the link and deciding this is the wrong download :)

when finished reading, go to link at bottom of this post:

is will say sql server 2012 express, ignore that, click download, a new window will pop up, tick the box

ENU\x64\SQLManagementStudio_x64_ENU.exe
click next, download will start

http://www.microsoft.com/en-us/download/details.aspx?id=29062

Tuesday 17 June 2014

using sqlserver jdbc driver with maven

Download the driver JAR from the link provided by Olaf and add it to your local Maven repository with;

mvn install:install-file -Dfile=sqljdbc4.jar -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dversion=3.0 -Dpackaging=jar

Then add it to your project with;

<dependency> 
     <groupId>com.microsoft.sqlserver</groupId> 
     <artifactId>sqljdbc4</artifactId> 
     <version>3.0</version> 
</dependency>

Monday 9 June 2014

install cassandra 2+ as service from package

the documentation on datastax website is out of date, to install the latest version of cassandra as a deb package and have it run as a service, enter the following in to terminal:

gpg --keyserver keyserver.ubuntu.com --recv 4BD736A82B5C1B00

gpg --export --armor 4BD736A82B5C1B00 | sudo apt-key add - && sudo apt-get update

sudo apt-get install cassandra

Sunday 8 June 2014

#!/bin/bash - no such file or directory

This can be cause by an extra carriage return at the end of the first line

execute the following in termial:

head -1 yourscript | od -c

if it ends with \r \n then it is not in the correct format.

if it ends with \n with no \r preceding that, then it is correct.

to fix the file, use dos2linux

sudo apt-get install dos2linux

dos2linux yourscript

remove hidden files that show on desktop in osx

Sometimes its good to see hidden files in finder, but its annoying that they show up on the desktop.

If you want to stop these showing, here is the command to run in terminal:

defaults write com.apple.finder CreateDesktop -bool false && killall Finder

to make them appear again, use:

defaults write com.apple.finder CreateDesktop -bool true && killall Finder

Saturday 7 June 2014

linux: fatal error: pyconfig.h: No such file or directory

This error is most likely produce by not having the correct dependencies installed.

Run the following command:

sudo apt-get install python-dev libxml2-dev libxslt-dev

Thursday 5 June 2014

linux: cannot open shared object file libudev.so.0

For a 32-bit system:

sudo ln -sf /lib/i386-linux-gnu/libudev.so.1 /lib/i386-linux-gnu/libudev.so.0

For a 64-bit system:

sudo ln -sf /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.0