Search code examples
linuxcmakeraspberry-piraspbian

cmake error: no version information available


I'm trying to run cmake on a Raspberry Pi 3 running Raspbian Jessie, following this guide. After installing cmake by running sudo apt-get install cmake, I get the following error when typing cmake at the command line:

cmake: cmake: no version information available (required by cmake)

this is repeated a dozen times or so, and concluded by:

cmake: relocation error: cmake: symbol, version GLIBC_2.4 not defined in file with link time reference

I checked that I have only 1 version of cmake installed: which cmake returns /usr/bin/cmake, and the /usr/bin folder only has 1 cmake file in it. Running /usr/bin/cmake explicitly results in the same errors with cmake replaced by /usr/bin/cmake. Could anyone advise on what might be going on and how to fix it? Thank you.


Solution

  • I confirm that the problem cannot be replicated on a different SD card. I conclude that the error was possibly due to corrupted data on a bad SD card. From what I've seen, here are some things to look for that might indicate a bad SD card:

    • Automatic resize by raspi-config does not result in the root filesystem being expanded as seen by raspberry pi (df -h shows a smaller rootfs size than the card size).
    • The filesystem is by default mounted as read-only. As a consequence X Window manager doesn't start, and startx fails to invoke it.
    • Various errors when running sudo-apt-get upgrade that can't be fixed by rerunning sudo apt-get update.

    Finally, I would suggest steering clear of generic SD cards, the one that didn't work for me was one of that variety.