How to install SQL Server 2022 on Ubuntu Server 24.04 LTS

Eghost 0 Reputation points
2024-06-09T22:09:54.9333333+00:00

I couldn't find a proper way to install SQL Server 2022 on Ubuntu Server 24.04 LTS. I tried to use Microsoft SQL Server 2022 from the Ubuntu 22.04 repository, but I couldn't run the service correctly. I'm done with this state of service (see printout).Is there any way I can perform the service? The truth is I'm just using Linux but I need to install SQL Server. If you could guide me step by step I would appreciate it.

Captura desde 2024-06-09 17-59-25

SQL Server | Other
{count} votes

5 answers

Sort by: Most helpful
  1. PhiHung Bach 25 Reputation points
    2024-07-06T00:32:50.3966667+00:00

    Solved. Complete Steps.

    =========================================
    Install MSSQL Server 2022 on Ubuntu 24.04
    curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
    curl https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
    curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | sudo tee /etc/apt/sources.list.d/mssql-server-2022.list
    :: Need to download & install libldap-2.5
    curl -OL http://archive.ubuntu.com/ubuntu/pool/main/o/openldap/libldap-2.5-0_2.5.18+dfsg-0ubuntu0.22.04.1_amd64.deb
    sudo apt-get install ./libldap-2.5-0_2.5.18+dfsg-0ubuntu0.22.04.1_amd64.deb
    sudo apt-get update
    sudo apt-get install -y mssql-server
    sudo /opt/mssql/bin/mssql-conf setup		####!
    systemctl status mssql-server --no-pager
    sudo ufw allow 1433/tcp
    sudo ufw enable
    sudo ufw status
    
    
    5 people found this answer helpful.

  2. Kleidi Kumbaro 11 Reputation points
    2025-01-05T22:31:50.9433333+00:00

    I got into this problem when updating ubuntu 22.04 to 24.04 and got it working with

    wget http://mirrors.kernel.org/ubuntu/pool/main/o/openldap/libldap-2.5-0_2.5.11+dfsg-1~exp1ubuntu3_amd64.deb (search here https://pkgs.org/search/?q=libldap)

    sudo dpkg -i libldap-2.5-0_2.5.11+dfsg-1~exp1ubuntu3_amd64.deb

    now sql server is starting normally on ubuntu 24.04 (Microsoft SQL Server 2022 (RTM-CU16) (KB5048033) - 16.0.4165.4 (X64) Nov 6 2024 19:24:49 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit)

    2 people found this answer helpful.

  3. Olaf Helper 47,436 Reputation points
    2024-06-11T05:26:24.6166667+00:00

    How to install SQL Server 2022 on Ubuntu Server 24.04 LTS

    Currently installation of SQL Server is supported on Ubuntu 20.04 and 22.04, but not on 24.04

    It may will work, but not supported. See

    https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup?view=sql-server-ver16#supportedplatforms

    1 person found this answer helpful.
    0 comments No comments

  4. Anonymous
    2024-06-11T05:21:20.8466667+00:00

    Hi @Eghost ,

    Thank you for reaching out and welcome to Microsoft Q&A.

    What steps did you take? Here is an article of how to install SQL Server on Ubuntu, it shows steps in detail, hope this can help you well.

    In addition, from the error messages you provided, please ensure the virtual machine configure available memory to at least 2GB and use the correct mssql-conf command.

    Please feel free to share your issue here if you have any confusions.

    Best regards,

    Lucy Chen


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    https://docs.microsoft.com/en-us/answers/support/email-notifications


  5. PhiHung Bach 25 Reputation points
    2024-07-06T00:13:56.6066667+00:00

    Solved.

    Download & Install :

    curl -OL http://archive.ubuntu.com/ubuntu/pool/main/o/openldap/libldap-2.5-0_2.5.18+dfsg-0ubuntu0.22.04.1_amd64.deb
    sudo apt-get install ./libldap-2.5-0_2.5.18+dfsg-0ubuntu0.22.04.1_amd64.deb
    
    
    
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.