Error incompatible library version for module

From GRASS-Wiki
Revision as of 13:24, 21 May 2011 by ⚠️AnneGhisla (talk | contribs) (more than one self-compiled grass version)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Q: Running GRASS, I get this error message:

  "ERROR: Incompatible library version for module. You need to rebuild GRASS
          or untangle multiple installations"

What's that? What should I do?

A1: Likely you have a self-compiled GRASS version (which is fine). So? When doing update from SVN which contains a change in the core GIS library, and a subsequent recompilation without having run "make distclean" before, this error is issued to avoid incompatibility problems.

Solution 1

Prepare and recompile your source code copy in this way:

 make distclean
 svn up
 ./configure ...
 make
 make install

Note: If you use the GDAL-GRASS plugin then also recompile and reinstall it - "just to be sure".

A2: You have compiled more GRASS versions from SVN, and run make install on more than one. I went into this problem when I compiled and installed both GRASS 6.4 and 6.5.

Solution 2

You can compile as many GRASS versions as you want; the problems come when you install more than one. The solutions to this error are various:

  • First solution can be to choose only one version to be the officially installed. Then remove the grass6.X folder in /usr/local/ (or in the folder you chose for install), and the executable (run which grass65 to find where the executable is). Recompile all involved versions, with the commands shown in Solution 1, except make install. Make install only the version you want to be the official one on your machine.
  • Keep all versions installed, and export the correct LD_LIBRARY_PATH just before running the version you want to use.
  • Remove all installed GRASS versions, recompile without installing them, and make links to all executables in /usr/local/bin.

Notes

  • the "make install" step requires "sudo" under Ubuntu.
  • a reminder that the last step ("sudo make install") can be avoided completely in single-user complilations since GRASS can be launched directly from within the "/path/to/src/grass64_release/bin.x86_64-unknown-linux-gnu/" directory. You can simply create the following link:
 /usr/local/bin/grass64 -> /path/to/src/grass64_release/bin.x86_64-unknown-linux-gnu/grass64
  • Also, on Ubuntu, in case one wants to install the compiled binaries, the program "checkinstall" is a good option instead of "make install". It creates a .deb package and installs it which can be easily uninstalled of course in case of future updates.