How do I install Microsoft ODBC Driver for sql server on WSL

Alexander Balasch 26 Reputation points
2024-04-12T15:30:24.1966667+00:00

How do I install Microsoft ODBC Driver for sql server on WSL?

This page only explains it for other linux variants but not for 5.15.146.1-microsoft-standard-WSL2

I think it is based on ubuntu but when when I try to run the instructions for ubuntu I get:

Ubuntu 12 is not currently supported.

Since the script filters for supported ubuntu versions but the command "lsb_release -rs" does not return an ubuntu version like 23.04 but just "12".

Because of that the installation fails. I cannot just remove the check since this value is used to download the correct package

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,743 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MikeyQiao-MSFT 560 Reputation points Microsoft Vendor
    2024-04-15T06:44:51.8233333+00:00

    Hi,Alexander Balasch

    As the official documentation indicates, please run the installation command on a system that meets the version requirements. WSL2 supports the installation of multiple Linux distributions.Refer to this article.

    You can follow the official tutorial to install different distribution versions that meet the requirements, or you can import your own downloaded versions. It is recommended to download Ubuntu 22.04.3 LTS from the Microsoft Store.

    Best regards

    Mikey Qiao

    1 person found this answer helpful.
    0 comments No comments