freeradius3 - 0.15.7_9 2020-01-20 : its stops : can't find libmysqlclient.so.20



  • freeradius3 - 0.15.7_9 - installed this morning 2020-01-20?

    When started using 'radiusd -X' it stops with the text it can't find libmysqlclient.so.20 :

    Could not link driver rlm_sql_mysql: Shared object "libmysqlclient.so.20" not found, required by "rlm_sql_mysql.so"
    Make sure it (and all its dependent libraries!) are in the search path of your system's ld
    /usr/local/etc/raddb/mods-enabled/sql[2]: Instantiation failed for module "sql1"
    

    These libs are available in /usr/local/lib/mysql :

    -rw-r--r--   1 root  wheel  4577404 Jan 14 21:56 libmysqlclient.a
    lrwxr-xr-x   1 root  wheel       20 Jan 14 21:56 libmysqlclient.so -> libmysqlclient.so.20
    -rwxr-xr-x   1 root  wheel  3889360 Jan 14 21:56 libmysqlclient.so.20
    lrwxr-xr-x   1 root  wheel       16 Jan 14 21:56 libmysqlclient_r.a -> libmysqlclient.a
    lrwxr-xr-x   1 root  wheel       17 Jan 14 21:56 libmysqlclient_r.so -> libmysqlclient.so
    lrwxr-xr-x   1 root  wheel       20 Jan 14 21:56 libmysqlclient_r.so.20 -> libmysqlclient.so.20
    drwxr-xr-x   2 root  wheel      512 Jan 17 15:35 plugin
    

    but not in /usr/local/lib/ ...

    I don't know what changed - between version freeradius _9 and _8 ....

    I created these 'links' so there are visible both in /usr/local/lib/ :

    lrwxr-xr-x  1 root  wheel  26 Jan 20 13:24 libmysqlclient.so -> mysql/libmysqlclient.so.20
    lrwxr-xr-x  1 root  wheel  26 Jan 20 13:24 libmysqlclient.so.20 -> mysql/libmysqlclient.so.20
    

    and FreeRadius (radiusd) is happy now.


  • LAYER 8 Global Moderator

    Where are you seeing this - are you on a snap, 2.5?

    I don't show _9 available in package manager on 2.4.4p3

    freerad.jpg



  • Oh ... oops.
    I'm using 2.4.5 2.4.5.a.20200119.2153, (pre 2.4.5 release) so I receive intermediate package releases non-ready-for-the-public that 2.4.4-p3 doesn't see.

    Anyway.
    I hope m yfeedback is useful for other 2.4.5 pre release testers.
    ( I'll backlink this thread from Home > pfSense® Software > Development )


  • LAYER 8 Global Moderator

    Yeah good idea - or we could just move the thread.


  • Rebel Alliance Developer Netgate

    Does that persist after a reboot? What shows up in the output of ldconfig -r?



  • @jimp said in freeradius3 - 0.15.7_9 2020-01-20 : its stops : can't find libmysqlclient.so.20:

    Does that persist after a reboot?

    Nice catch !

    @jimp said in freeradius3 - 0.15.7_9 2020-01-20 : its stops : can't find libmysqlclient.so.20:

    What shows up in the output of ldconfig -r?

    This :

    [2.4.5-DEVELOPMENT][admin@pfsense.brit-hotel-fumel.net]/root: ldconfig -r
    /var/run/ld-elf.so.hints:
            search directories: /lib:/usr/lib:/usr/lib/compat:/usr/local/lib:/usr/local/lib/freeradius-3.0.20:/usr/local/lib/ipsec:/usr/local/lib/mysql:/usr/local/lib/perl5/5.30/mach/CORE
            0:-lz.6 => /lib/libz.so.6
            1:-lssp.0 => /lib/libssp.so.0
            2:-lbsdxml.4 => /lib/libbsdxml.so.4
            3:-lgcc_s.1 => /lib/libgcc_s.so.1
    .... snip snip ....
            247:-lmysqlclient.20 => /usr/local/lib/mysql/libmysqlclient.so.20
            248:-lmysqlclient_r.20 => /usr/local/lib/mysql/libmysqlclient_r.so.20
    

    It's ok now.
    "Solved !'


  • LAYER 8 Global Moderator

    Is it solved because what you did, or after reboot... I don't recall packages requiring reboot before?


  • Rebel Alliance Developer Netgate

    It shouldn't require a reboot, but it's possible that when it didn't work, the mysql lib directory wasn't in the ldconfig path when it should have been. A reboot might have made it refresh the paths it needed there. In the output posted last, I see the mysql lib dir in there.



  • Guess not. (edit : replying to @johnpoz )
    I removed my links I put in myself before rebooting.

    The "ldconfig -r" shows the correct info now. For me, it looks like the /mysql/ dir is now included into the lib search path.



  • The latest "freeradius3 0.15.7_10" and or "2.4.5.a.20200124.0859" solved this.

    edit : that is : a reboot after a package (FreRadius) or a second reboot after an update to, for example, "2.4.5.a.20200124.0853" is needed.


Log in to reply