Linking Errors When Starting FreeRADIUS
If you receive an error similar to the following:
Module: Loaded SQL rlm_sql: Could not link driver rlm_sql_mysql: file not found rlm_sql: Make sure it (and all its depend libraries!) are in the search path radiusd.conf[50]: sql: Module instantiation failed.
It means that some shared libraries on the server are not available. There are a couple of possible causes from this.
First, the libraries that are needed by the module listed in the error messages couldn’t be found when FreeRADIUS was being compiled. However, if a static version of the module was available, it was built at compile time. This would have been indicated with very prominent messages at compile time.
The other cause is that the dynamic linker on your server is not configured correctly. This would result in the libraries that are required being found at compile time, but not run time. FreeRADIUS makes use of standard calls to link to these shared libraries, so if these calls fail, the system is misconfigured. This can be fixed by telling the linker where these libraries are on your system, which can be done in one of the following ways:
Write a script that starts FreeRADIUS and includes the variable LD_LIBRARY_PATH. This sets the paths where these libraries can be found.
If your system allows it, edit the /etc/ld.so.conf file and add the directory containing the shared libraries to the list.
Set the path to these libraries inside radiusd.conf using the libdir configuration directive. ...