Trying to install SQL Server on Ubuntu 18.04, I'm getting

# sudo apt-get install -y mssql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mssql-server : Depends: libcurl3 but it is not going to be installed
                Depends: openssl (<= 1.1.0)
E: Unable to correct problems, you have held broken packages.

Is it possible to install SQL Server on Ubuntu 18.04 and is it supported?



No, Microsoft only supports 16.04 LTS. The version that's two years old.


In order to install SQL Server on Ubuntu whether new or old, I suggest installing it as a chroot. To do that first install debchroot, and then use that utility to set up a chroot.

sudo apt install debchroot
sudo debootstrap --arch=amd64 xenial /opt/mschroot http://archive.ubuntu.com/ubuntu/

You'll have to --bind mount your host's /proc

sudo mount --bind /proc /opt/mschroot/proc

Now jump into your chroot

sudo chroot /opt/mschroot

And set out to configure it,

apt update

## Add the Universe Repository (needed https://dba.stackexchange.com/q/212868/2639)
apt install wget software-properties-common apt-transport-https
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
apt update

## Add Microsoft Repository
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)"
apt update

## Configuration complete begin install
apt install -y mssql-server

Then configure it, (use option 2 for Developer)

/opt/mssql/bin/mssql-conf setup

You'll have to pick a password, note for reasons unexplained The password must be at least 8 characters long and contain characters from three of the following four sets: Uppercase letters, Lowercase letters, Base 10 digits, and Symbols.. I suggest everyone use MICROSOFTsucksH4RD, as it satisfies that. Lastly, don't forget to disable the spyware.

/opt/mssql/bin/mssql-conf set telemetry.customerfeedback false
  • what is the advantage of using a chroot environment? – opensas Feb 5 '19 at 2:15
  • 1
    microsoft can't pollute anything, and SQL Server is effectively containerized. – Evan Carroll Feb 5 '19 at 2:23

The solution (on Ask Ubuntu) I have tested works but with an BIG disadvantage:

Quoting from the answer by langioletto:

Apparent solution for Ubuntu 18.04:

apt-get install -y libjemalloc1 libsss-nss-idmap0 libc++1 gawk curl

curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -

add-apt-repository "$(curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)"

add-apt-repository "$(curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list)"

wget http://archive.ubuntu.com/ubuntu/pool/main/c/ca-certificates/ca-certificates_20160104ubuntu1_all.deb

dpkg -i ca-certificates_20160104ubuntu1_all.deb

wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.0.2g-1ubuntu4_amd64.deb

dpkg -i openssl_1.0.2g-1ubuntu4_amd64.deb

apt install -y libcurl3

apt-get update
apt-get install -y mssql-server

The disadvantage is that if you do apt-get update, the mssql-server will be deleted again.

Even you insist on running in v18.04, the Agent Service (Jobs) will be disabled. So you are recommended to run SQL 2017 on ubuntu v16.04 so far.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.