Just ran into this issue when SQLServer was upgraded from 2014 to 2022 (without my knowledge) so leaving this here in case it helps someone. The error was:
"Can't open lib '/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so' : file not found (0)"
The solution was to install the latest driver https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver16&tabs=alpine18-install%2Calpine17-install%2Cdebian8-install%2Credhat7-13-install%2Crhel7-offline
and update the .ini files that reference them, to include the new connection variables.