Ubuntu 21.10 – Can’t Install MS SQL Server

sql serverUbuntu

I am trying to install Microsoft SQL Server on Ubuntu 21.10 and I am getting an error. I noticed that Microsoft page doesn't mention 21; so maybe it's not possible yet. But Canonical announcement specifically mentions SQL Server support.

Anyway, when I run sudo apt install mssql-server I am getting the following:

The following packages have unmet dependencies:
mssql-server : Depends: libldap-2.4-2 but it is not installable

if I try to install libldap manually, it just says that unable to locate package. However, when I run sudo apt install libldap-2.4-2, I get something more interesting:

Package libldap-2.4-2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libldap-common

But how do I tell sql server installer to use it?

Maybe I am using a wrong repository? This guide still uses 20.04 – and there isn't much relevant under 21.

Best Answer

In order to anwser clearly and don't polemic with useless subjects in comments : it's the Microsoft role's to update their product in order to follow system evolution. By the time, we also seen that the OS create sort of aliases for compatibility too ; in instance and in state of the art : mssql seams not to be compatible with Ubuntu 21.10

The guide you used tell Ubuntu to use Ubuntu 20.04 repository, in order to have the right package, that's why it doesn't work natively in 21.10.

So, if you really want to continue to use Ubuntu 21.10 (as temporaly OS it is), you only can add the Ubuntu 20.04 repositories, which is a very not recommanded solution