BuycPanel Blog

BuycPanel Blog

Latest news and updates

What is Prelinking? How do you Disable Prelinking in cPanel?

Posted by Allura on 13 05 2019.

A Brief Overview
Pre-Linking is a mechanism which is primarily used for linking programs to shared libraries ahead of time. Generally, every time an application is run it has to have its external symbols resolved – looked up in the shared library symbol table and after that fixed up in the program binary so that it can refer to the correct offsets in the library. If you want to use pre-linking, there is a special utility that you can run, which does this resolution and fixup once for the program. This actually saves the cost of linking at runtime.However, a major drawback of this is that, if the shared library is changed then the fixups no longer remain consistent, and the program has to be fixed up again. This is, however, much less of an issue in an embedded situation, where the programs and libraries are less likely to change than…

A Brief Overview

Pre-Linking is a mechanism which is primarily used for linking programs to shared libraries ahead of time. Generally, every time an application is run it has to have its external symbols resolved – looked up in the shared library symbol table and after that fixed up in the program binary so that it can refer to the correct offsets in the library. If you want to use pre-linking, there is a special utility that you can run, which does this resolution and fixup once for the program. This actually saves the cost of linking at runtime.

However, a major drawback of this is that, if the shared library is changed then the fixups no longer remain consistent, and the program has to be fixed up again. This is, however, much less of an issue in an embedded situation, where the programs and libraries are less likely to change than in a desktop or server Linux system.

This document will explain how to disable pre-linking. Prelinking has been often seen to cause issues, hence we no longer support it as of cPanel & WHM version 54. If and when you enable pre-linking, you may encounter problems regarding broken RPMs. For more information on pre-linking, you can read the Wikipedia article.

 

WHM Autofixer

From June 29, 2016, the WHM Autofixer will automatically disable pre-linking. If you want to block the WHM Autofixer and continue to use pre-linking on your server, you can run the following command to create the  /var/cpanel/dont_remove_prelink  touch file:

touch /var/cpanel/dont_remove_prelink

How to Disable Prelinking Manually

If you want to disable pre-linking, you can perform the following steps:

  1. You can log in to your server via SSH. If you want more information, please read our How to Disable Prelinking
  2. In the /etc/sysconfig/prelinkfile, make sure you set the PRELINKING setting to no.
  3. After that you can implement your changes by running the following command:
/etc/cron.daily/prelink
  1. If you want to verify that your RPMs remain functional, you can run the following command:
/usr/local/cpanel/scripts/check_cpanel_rpms –fix
  1. This script will not return output, if it succeeds.

A Brief Conclusion

This documentation details upon the concept of Prelinking and methods of disabling it.