The image you've installed seems to use the eglibc, while the Arduino IDE's toolchain links against uclibc, that may be the reason of your troubles. Try running it on an official SD card image (which uses uclibc), you can download it here: Galileo Software Downloads
Or, by the way, you can simply boot off of the SPI (i.e. without SD card) - SPI image uses uclibc and is good for testing. It won't preserve your test program (because it's all in memory when booting from SPI), but if it works, then you can use the official SD card image for further work.