diff --git a/install-php-extensions b/install-php-extensions index 1bb2978..6280484 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -1385,7 +1385,12 @@ installMicrosoftSqlServerODBC() { debian) # https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server#debian17 printf -- '- installing the Microsoft APT key\n' - curl -sSLf https://packages.microsoft.com/keys/microsoft.asc | apt-key add - + if test $DISTRO_VERSION_NUMBER -ge 11; then + # apt-key is deprecated + curl -sSLf -o /etc/apt/trusted.gpg.d/microsoft.asc https://packages.microsoft.com/keys/microsoft.asc + else + curl -sSLf https://packages.microsoft.com/keys/microsoft.asc | apt-key add - + fi if ! test -f /etc/apt/sources.list.d/mssql-release.list; then printf -- '- adding the Microsoft APT source list\n' curl -sSLf https://packages.microsoft.com/config/debian/$DISTRO_VERSION_NUMBER/prod.list >/etc/apt/sources.list.d/mssql-release.list