sorry for late replying. here the changes
# Database type
# Current supported are: rlm_sql_mysql, rlm_sql_postgresql,
# rlm_sql_iodbc, rlm_sql_oracle, rlm_sql_unixodbc, rlm_sql_freetds
driver = "/usr/local/lib/lib/rlm_sql_mysql"
I had tried to put the driver in
all above got the same error.
then I installed all of 14 applications in MySQl, even try to upgrade to freeradius 2.0.2 or MySQL 5 but still no luck.
Red Hat ready a mess..very hard to find a file and alway different the others.
Here the some comment from http://wiki.freeradius.org/index.php/FAQ
It says "Could not link ... file not found", what do I do?
You may see an error message like the one below, when you try to run the server:
Module: Loaded SQL rlm_sql: Could not link driver rlm_sql_mysql: file not found rlm_sql: Make sure it (and all its dependent libraries!) are in the search path of your system's ld. radiusd.conf: sql: Module instantiation failed.
There are only a few things that can be happening:
1) The 'mysql_config' cannot be found in $PATH. Try running "./configure | grep mysql_config" and see if you get the follows:
checking for mysql_config... no
configure: WARNING: mysql libraries not found. Use --with-mysql-lib-dir=<path>.
configure: WARNING: sql submodule 'mysql' disabled
If it is, simply do something like "export $PATH=$PATH:/usr/local/mysql/bin" and "./configure | grep mysql_config" again to make sure you get:
checking for mysql_config... yes
Then you should run "make;make install" again.
2) You put shared libraries into a place where your linker cannot find them.
Everyone blames FreeRADIUS because it's the one printing the error message. But it just gets the error message from your linker.
3) You don't have static libraries for SQL clients on your system. So doing "./configure --disable-shared;make" doesn't help.
The 'make' process WILL print out error messages saying it's creating a static library which links to a dynamic one. If your linker is misconfigured (see #1), then FreeRADIUS still won't work.
So you probably ignored the error/warning messages produced during the 'make' stage. That's bad.
And libtool still does dynamic linking when told to do static linking, instead of failing to do the build. It should be taken out and shot.
There is nothing you can do to FreeRADIUS to fix issues with non-FreeRADIUS shared libraries. Fix your SQL libraries so that:
a) your linker can find them
b) There are static versions of those libraries available.
You can use the LD_LIBRARY_PATH environment variable in a script which starts the server, to set the paths where these libraries may be found.
One some systems, you can edit /etc/ld.so.conf, ('man ld.so', or 'man ldconfig'), and add the directory containing the dynamic libraries to that list.
See also the 'libdir' configuration directive in the 'radiusd.conf' file which is distributed with the server. It contains additional information.
If none of these solutions work, then your ONLY option is to build FreeRADIUS without dynamic libraries. This may be done via:
Please READ the messages produced during the 'make' and 'make install' stages. While there is a lot of text to wade through, these messages may be the ONLY source of information as to what's wrong your system.
I see only one radiusd in the process list. What is wrong?
If you have configured FreeRADIUS to use threads, then nothing is wrong. Newer Linux kernels / procps utilities report one thread by default. You can execute ps in the following ways to see all threads:
For older versions of ps / kernel (2.4), use:
* ps -efm
* ps auxm
For newer versions of ps / kernel (2.6+), you may prefer to use:
* ps -efL
* ps auxH
I could not find LD_LIBRARY_PATH.
$env | grep LD ---- return nothing.
libdir = /usr/lib:/usr/local/lib:/usr/share/doc/freeradius-1.0.2:/usr/share/doc/radiusd/src/modules/rlm_sql/drivers
still no out come.
Ready no idea what should I do anymore. It's like dead end!