MRG Interactive Developments

Mesoscale Research Group, McGill/SUNY


relink: Irregular update of shared library names




Introduction to relink

The relink utility is a program that re-links a broken shared libraries. There should be no real need for this tool, since each package is independently repsonsible for creating the soname version-specific shared libraries (libXXX.so.x.x) and for linking them to the standard shared library linker name (libXXX.so) [note that ldconfig -n takes care of linking the soname to the library real name. However, it is conceivable that a package update is uninstalled, and that it removes the linker names without setting them back to referencing an earlier version of the package - in this case new links against the package would fail. The relink tool simply recreates the links to the linker names and updates using ldconfig. It should be used only when you have clearly diagnosed a missing shared library-related problem in a specific directory.

Usage and Examples

relink runs from the command line of any machine with Python installed. Following installation (which is as simple as downloading the program into a directory found by the user's path. The user should become familiar with the relink options by running python relink.py -h. The most common command-line argument is -d or --directory, both of which allow the user to specify the directory to be re-linked. The default functionality of relink is to re-link in the current directory.

To re-link in the /usr/X11R6/lib directory, simply type python relink.py -d /usr/X11R6/lib. This will update all linker names to the latest versions of the shared libraries available in the directory and rerun ldconfig to update the real name links at the same time. To update the cache, the user may choose to run ldconfig from the command line following the re-linking process.



MRG Interactive is a supporter of open source initiatives and,

SourceForge.net Logo

Questions or Comments? Contact our WebMaster.