共用方式為


Installing SQL Server 2017 for Linux on Ubuntu 18.04 LTS

[UPDATE as of 2018/11/21 at the end.]

Prior to SQL Server for Linux 2017 CU10 the package dependencies prevented install on Ubuntu 18.04 LTS. The SQL Server 2017 installation packages have updated use the libssl1.0.0 package, allowing installation to occur on Ubuntu 18.04 LTS installations.

Ubuntu 18.04 LTS was updated and ships with version 1.1 of the openssl package. SQL Server 2017 for Linux had version a 1.0 openssl dependency. The correct dependency is the libssl1.0.0 package which CU10 corrects.

There may be additional actions required on some systems. If libcurl4 is installed libcurl4 should be removed and libcurl3 installed as shown in these example commands.

Ø sudo apt-get remove libcurl4

Ø sudo apt-get install libcurl3

After this step, following standard set of instructions should allow you to install SQL Server.

   Note: Please see the update as of 2018/11/21 at the end.

Upgrade from earlier Ubuntu versions:

With the release of SQL Server 2017 CU10 (build 14.0.3037.1), you can install it on a new Ubuntu 18.04 server. Upgrade from Ubuntu 16.04 to 18.04 still results in some issues. As noted earlier, SQL Server 2017 depends on libcurl3. Our testing indicates that upgrade to Ubuntu 18.04 may result into upgrade of libcurl library to libcurl4. There is no currently known way to install that library side by side. Because of the way dependencies work in Linux, during the distribution upgrade libcurl library would be upgraded to libcurl 4 and libcurl3 as well as its dependent packages, which includes SQL Server 2017 would be uninstalled. While the databases would typically not be removed as /var/opt/mssql and other data related folders are not removed during uninstall of SQL Server 2017, additional modifying the libcurl library to version 3 after distribution upgrade and install as well as configuration of SQL Server 2017 may result in additional unintended outage. We are currently working on ways to correct this situation.

   Note: Please see the update as of 2018/11/21 at the end.

Support state:

While we have unblocked the installation and use of SQL Server 2017 on Ubuntu 18.04, it has not been fully tested for production use. So, we recommend that you use SQL Server 2017 on Ubuntu 18.04 for non-production purpose only. We will update the support for Ubuntu 18.04 for full production use once thorough testing has been completed and full support has been documented.

Additional Note:

A few systems may require version 1.0 of the OpenSSL libraries to connect to SQL Server. Using OpenSSL 1.0 can be done as follows:

  1. Stop SQL Server
    1. sudo systemctl stop mssql-server
  2. Open the editor for the service configuration
    1. sudo systemctl edit mssql-server
  3. In the editor, add the following lines to the file and save it:
    1. [Service]
    2. Environment="LD_LIBRARY_PATH=/opt/mssql/lib"
  4. Create symbolic links to OpenSSL 1.0 for SQL Server to use
    1. sudo ln -s /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 /opt/mssql/lib/libssl.so
    2. sudo ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /opt/mssql/lib/libcrypto.so
  5. Start SQL Server
    1. sudo systemctl start mssql-server

 

[UPDATE as of 2018/11/21.]

With SQL Server 2017 CU12, the libcurl3 hard dependency should no longer exist. With this update in place, the workaround of uninstalling libcurl4 and installing libcurl3 should no longer be required to install SQL Server 2017 on Ubuntu 18.04. Also, if you are upgrading from Ubuntu 16.04 to Ubuntu 18.04 with SQL Server 2017 CU12 in place, upgrade should no longer force uninstall of SQL Server 2017.

Important, this does not change the support state of SQL Server 2017 on Ubuntu 18.04. Work to certify Ubuntu 18.04 with SQL Server 2017 is planned and we will announce when it will be supported for production use on this page. Until such as an announcement occurs, SQL Server 2017 on Ubuntu 18.04 should be considered experimental and for non-production use only.

 

Mitchell Sternke | Software Engineer

Dylan Gray | Software Engineer

Tejas Shah | Senior Program Manager

Vin Yu | Program Manager

Comments

  • Anonymous
    August 29, 2018
    Thank you very very much. It was useful for me to run mssql under OpenSuse Tumbleweed, just with some variations.also needed this:sudo ln -s /usr/lib64/libldap_r-2.4.so.2 /usr/lib64/libldap-2.4.so.2
  • Anonymous
    November 12, 2018
    I'm encountering issues installing SQL Server 2017 on Ubuntu 18.10. It says it depends on libjemalloc1 but libjemalloc1 was replaced by libjemalloc2 in 18.10. Can you help with this?
    • Anonymous
      November 21, 2018
      We only intend to certify the LTS branches, so 16.04/18.04 and so on. But this is a good early warning if library version that SQL depends on changes in this minor development focused release. Temporarily you could try to remove the newer version and installing older version manually, in similar way that libcurl workaround was described.