mssql-server: Depends on libjemalloc1 which is a virtual package and is not provided by any available package

Solution 1:

I'm assuming you've followed the installation steps given on Microsoft's SQL server installation page right upto the point where you faced the error.

Here is a workaround:

  1. Download the latest version of libjemalloc (this one is for Ubuntu 18.04) from this mirror here - http://ftp.osuosl.org/pub/ubuntu/pool/universe/j/jemalloc/libjemalloc1_3.6.0-11_amd64.deb
  2. Install it: sudo dpkg -i libjemalloc1_3.6.0-11_amd64.deb
  3. Now run the apt command to install ms-sql server: sudo apt-get install mssql-server

Hope this works for you.

Solution 2:

I have found that MSSQL is also compatible with libjemalloc2. If you prefer to not install older packages, you can instead rebuild Microsoft's package with updated dependencies as outlined here: How do I install MS SQL for ubuntu 18.04 LTS?

Note that you will need to also run

sed -i -e 's#libjemalloc1#libjemalloc2#g' newpkg/DEBIAN/control

in step 4 to update the libjemalloc dependency so that it will work in Ubuntu 18.10.