Installing SQL Server 2022 on newer Ubuntu 24.04

I had a need to install SQL Server 2022 on Ubuntu 24.04. The instructions for Ubuntu 22.04 will work fine, until you start it. While it does install with the Ubuntu 22.04 packages, the dependencies are incorrectly marked*. When you try to set up the new SQL Server instance, it’ll make this error on startup:

Configuring SQL Server...

/opt/mssql/bin/sqlservr: error while loading shared libraries: liblber-2.4.so.2: cannot open shared object file: No such file or directory

Note in the LDD output on a fresh install:

root@cylinder-ubuntu-vm:~# ldd /opt/mssql/bin/sqlservr 
	linux-vdso.so.1 (0x00007ffe297a0000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007baa97bf9000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007baa97bf4000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007baa97bef000)
	libnuma.so.1 => /lib/x86_64-linux-gnu/libnuma.so.1 (0x00007baa97be1000)
	libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007baa97b8d000)
	libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007baa97ac2000)
	libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007baa973d4000)
	libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007baa97abc000)
	libsss_nss_idmap.so.0 => /lib/x86_64-linux-gnu/libsss_nss_idmap.so.0 (0x00007baa97aae000)
	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007baa97aa4000)
	libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x00007baa973c3000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007baa972da000)
	liblber-2.4.so.2 => not found
	libldap_r-2.4.so.2 => not found
	libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007baa972a7000)
	libssl.so.1.1 => not found
	libcrypto.so.1.1 => not found
	libc++.so.1 => /opt/mssql/bin/../lib/libc++.so.1 (0x00007baa971a1000)
	libc++abi.so.1 => /opt/mssql/bin/../lib/libc++abi.so.1 (0x00007baa9715f000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007baa97131000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007baa96e00000)
	/lib64/ld-linux-x86-64.so.2 (0x00007baa97c05000)
	libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007baa97124000)
	libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007baa9711d000)
	libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007baa9710a000)
	libaudit.so.1 => /lib/x86_64-linux-gnu/libaudit.so.1 (0x00007baa970dc000)
	libcap.so.2 => /lib/x86_64-linux-gnu/libcap.so.2 (0x00007baa970cf000)
	libatomic.so.1 => /lib/x86_64-linux-gnu/libatomic.so.1 (0x00007baa970c2000)
	libcap-ng.so.0 => /lib/x86_64-linux-gnu/libcap-ng.so.0 (0x00007baa970ba000)

You’ll need the OpenLDAP 2.4 and OpenSSL 1.1 libraries from a previous LTS installed (I’ve linked the ones for focal). Thankfully, these won’t conflict with the newer currents versions you have installed. You should be able to install these with dpkg -i, then configuring and starting SQL Server should work as you expect.


*: The dependencies on the package are messed up in other ways too. I wanted to install it in a VM on my Mac, but it demands the amd64 version of hostname, Python, and GDB; installing those will wreak havoc on your arm64 VM. I didn’t have much luck trying to tame it (unfortunately, equivs to build a dummy package for those didn’t work for me) before giving up and using an x86 system. If you know how to make this better, let me know.

Leave a Reply

Your email address will not be published. Required fields are marked *