In this article, we will guide you through the steps of installing Microsoft SQL Server (MS SQL) on Ubuntu 18.04 LTS. Although Microsoft does not officially support this, there are workarounds that can enable you to run MS SQL on Ubuntu 18.04 LTS. Please note that this workaround is recommended for testing purposes only.
- Step 1: Download MS SQL Server Package for Ubuntu 16.04
- Step 2: Unpack the Downloaded Package
- Step 3: Modify the Control File
- Step 4: Repackage the Modified Package
- Step 5: Install the Modified Package
- Step 6: Install Missing Dependencies
- Step 7: Retry Installing the Modified Package
- Step 8: Set Up MS SQL Server
Before we get started, you need to have:
- Ubuntu 18.04 LTS installed on your machine.
- Access to a terminal window/command line (Ctrl-Alt-T).
- Sudo or root privileges.
Step 1: Download MS SQL Server Package for Ubuntu 16.04
Since Microsoft does not provide a package for Ubuntu 18.04, we will download the package intended for Ubuntu 16.04. You can download it from the Microsoft website.
In your terminal, navigate to the directory where you want to download the package and use the
This command downloads the MS SQL Server package for Ubuntu 16.04.
Step 2: Unpack the Downloaded Package
Next, we need to unpack the downloaded package. We will use the
dpkg-deb command for this:
dpkg-deb -x mssql-server_14.0.3192.2-2_amd64.deb mssql-server
-x parameter extracts the files from the package.
Step 3: Modify the Control File
After unpacking the package, we need to modify the control file to change the OpenSSL dependency. Navigate to the control file directory:
Open the control file using a text editor, such as nano:
In the control file, find the line that says
openssl (<= 1.1.0). Change it to
openssl (<= 1.1.1). Save and close the file.
Step 4: Repackage the Modified Package
Now we will repackage the modified files into a new .deb package. Navigate back to the directory where the unpacked files are located and use the
dpkg-deb -b mssql-server mssql-server-modified.deb
-b parameter builds a new package.
Step 5: Install the Modified Package
Attempt to install the modified package using the
dpkg -i mssql-server-modified.deb
-i parameter installs the package. This will initially fail due to missing dependencies.
Step 6: Install Missing Dependencies
To install the missing dependencies, use the
apt-get install -f
-f parameter fixes broken dependencies.
Step 7: Retry Installing the Modified Package
Now retry the installation of the modified package:
dpkg -i mssql-server-modified.deb
Step 8: Set Up MS SQL Server
Follow the instructions provided by the package to set up MS SQL Server. You can start the setup with the following command:
Congratulations! You have successfully installed MS SQL Server on Ubuntu 18.04 LTS. Remember, this is a workaround and not officially supported by Microsoft. Always ensure to have proper backups of your data and consider using other officially supported databases on Ubuntu 18.04, such as MySQL.
Yes, you can install MS SQL Server on Ubuntu 18.04 LTS by following the steps outlined in this article.
No, installing MS SQL Server on Ubuntu 18.04 LTS is not officially supported by Microsoft. This workaround is recommended for testing purposes only.
The prerequisites for installing MS SQL Server on Ubuntu 18.04 LTS include having Ubuntu 18.04 LTS installed on your machine, access to a terminal window/command line, and sudo or root privileges.
You can download the MS SQL Server package for Ubuntu 16.04 from the Microsoft website. The download link is provided in Step 1 of this article.
If the installation fails due to missing dependencies, you can use the
apt-get install -f command to install the missing dependencies. This command is explained in Step 6 of this article.
No, this workaround is recommended for testing purposes only. It is not recommended to use this workaround for production purposes. Always ensure to have proper backups of your data and consider using other officially supported databases on Ubuntu 18.04, such as MySQL.