Ubuntu – How to install MS SQL for ubuntu 18.04 LTS


I looked up on the internet but all those steps to install were regarding 16.04 version. Is it available yet on 18.04 ? If yes,how?

Best Answer

Microsoft does not provide official mssql-server for 18.04 yet (05-12-2018), for testing only you may try this workaround(from me).

Workaround for installing Microsoft's SQL Server (mssql) on Ubuntu


  1. Download latest package mssql-server_14.0.3025.34-3_amd64.deb from https://packages.microsoft.com/ubuntu/16.04/mssql-server-2017/pool/main/m/mssql-server/

  2. Change directories

    cd ${HOME} && mkdir -p tmp/mssql/newpkg/DEBIAN/ && cd tmp/mssql
    wget https://packages.microsoft.com/ubuntu/16.04/mssql-server-2017/pool/main/m/mssql-server/mssql-server_14.0.3025.34-3_amd64.deb
  3. Unpack

    dpkg-deb -x mssql-server_14.0.3025.34-3_amd64.deb newpkg/
    dpkg-deb -e mssql-server_14.0.3025.34-3_amd64.deb newpkg/DEBIAN/
  4. Modify

    sed -i -e 's#openssl (<= 1.1.0)#openssl (<= 1.1.1)#g' newpkg/DEBIAN/control
    cat newpkg/DEBIAN/control | grep openssl
  5. Repackage

    dpkg-deb -b newpkg/ 18.04-mssql-server_14.0.3025.34-3_amd64_.deb
  6. First try, this will fail for dependencies

    sudo dpkg -i 18.04-mssql-server_14.0.3025.34-3_amd64_.deb
  7. Install dependencies

    sudo apt install -f
  8. Second try, this should be done

    sudo dpkg -i 18.04-mssql-server_14.0.3025.34-3_amd64_.deb
  9. Follow the messages from package to setup the mssql server


The database directory /var/opt/mssql should not put on zfs dataset, if you are using zfs, create a zvol and format as ext4/xfs for it.

Error: "Dump collecting thread [4404] hit exception [6]. Exiting."
Fix: sudo usermod -a -G disk mssql
Reason: mssql user can not access zvol.


Related Question