Installing MSSQL Server in Ubuntu Getting "version `GLIBC_2.30' not found " Error

Edward1 1 Reputation point
2022-01-11T19:39:25.113+00:00

I am trying to install MS SQL Express 2017 in Ubuntu 18. I mange to get through all the steps as outlined in this procedure:

https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-linux-2017#feedback

Until the actually installation when I receive this error:

Configuring SQL Server...

/opt/mssql/bin/sqlservr: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.30' not found (required by /opt/mssql/bin/sqlservr)
Initial setup of Microsoft SQL Server failed. Please consult the ERRORLOG
in /var/opt/mssql/log for more information.

Fairly new at linux. So any help is welcome.
Thanks!

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,865 questions
0 comments No comments
{count} votes

5 answers

Sort by: Most helpful
  1. Ronen Ariely 15,191 Reputation points
    2022-01-11T22:29:58.697+00:00

    Hi,

    glibc is GNU Project's implementation of the C/C++ standard library. SQL Server requires GLIBC.
    https://en.wikipedia.org/wiki/Glibc

    glibc 2.30 was released on August 2019 with Ubuntu 19.10
    Ubuntu 18.04 originally comes with glibc 2.27 (not sure which version comes with 18)

    I assume that the latest version of SQL Server 2017 Cumulative update 27 (CU27) which was released on 2021-10-27, requires newer version or glibc that you have installed.

    check which version of the GNU C library (glibc) is used by using the command: ldd --version

    Note! If I am not mistaken then you need version 2.27 for SQL Server.

    I cannot recommend you what to do in production as any upgrade might impact different application, but You probably have an older version of the library and you will need to upgrade GLIBC in order to use the latest version of SQL Server 2017.

    Please check the following discussion which recommend NOT to install glibc: https://stackoverflow.com/questions/62324422/version-glibc-2-28-not-found

    Note! why do you want to install SQL Server Empress 2017 and not the latest version 2019? Since you are using the free version, in first glance it seems like best practice for you is to use SQL Server Express 2019.


  2. CathyJi-MSFT 22,286 Reputation points Microsoft Vendor
    2022-01-12T02:47:17.31+00:00

    Hi @Edward1 ,

    Please using below command to check the version of glibc that installed in Ubuntu.

    strings /lib64/libc.so.6 |grep GLIBC_  
    

    Check the result whether GLIBC_2.30 is listed. If not, you need to upgrade GLIBC. Updating GLIBC is a high-risk operation, suggest you doing it in test environment.

    You can follow the steps from below blog to upgrade GLIBC, but the blog is in Chinese. You may need to use google translation.

    `GLIBC_2.23‘ not found问题解决


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


  3. Ronen Ariely 15,191 Reputation points
    2022-01-12T23:24:16.137+00:00

    Hi,

    strings: '/lib64/libc.so.6': No such file

    Using the command strings /lib64/libc.so.6 | grep GLIBC_ will not help you probably, since this only check specific location and does not mean that glibc is not installed if you get No such file.

    In order to find the location of the file you can run the command: locate libc.so.6

    In my machines the file exists in the location: /lib/x86_64-linux-gnu/libc.so.6 for example. In fact, as of Ubuntu 17.10 and above this is the location of the file. Therefore, this mean it will return same as you got strings: '/lib64/libc.so.6': No such file since the file is not in that location.

    Note: You have option to create a symbolic link to this location if the application is looking for the file there. This can be done using the command:

    Sudo ln -s <path to the ibc.so.6 which you found using the command locate> /lib/libc.so.6
    

    But SQL Server 2019 should not need this

    ldd (Ubuntu GLIBC 2.27-3ubuntu1.4) 2.27 ...

    According to the information you provided, it seems like you have all you need (version 2.27 works fine for me for SQL Server 2019) and the installation of SQL Server 2019 should find the file in that location.

    I went with 2017 because I felt it would be a smaller install, but maybe 2019 is not much larger.

    Try to install SQL Server Express 2019

    The size should be about the same and you can gain a lot from the new features and performance might be better as well in most cases.

    Note: You can follow this step by step to create Azure VM and install SQL Server

    https://ariely.info/Blog/tabid/83/EntryId/315/Create-UBUNTU-Azure-VM-and-install-SQL-Server.aspx


  4. WilsonHensel 1 Reputation point
    2022-04-03T02:17:19.09+00:00

    @Ronen Ariely I am facing the same issue. I believe it is because I accidentally gave this command during installation.

    sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list)"

    which is meant for Ubuntu 20.04, but my Computer runs on Ubuntu 18.04. I then gave the command meant for ubuntu 18.04.

    sudo add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/18.04/mssql-server-2019.list)"

    But I still think that the sql setup command(sudo /opt/mssql/bin/mssql-conf setup) still points to the latest repository.

    Is there a way I can remove the repository and do it from the beginning?

    0 comments No comments

  5. Fernán Orjuela Carvajal 1 Reputation point
    2022-09-29T20:49:09.94+00:00

    I´ve solution for this problem.

    In my case I have installed fully funcional SQL Server 2017 and y tried to upgrade SQLServer 2019 in Ubuntu 18.04 without read guidelines from Microsoft site, big error.

    I Installed wrong APT repositories with .../20.04/... and then I have received the same error that you:

    Sep 29 13:05:26 pangea-bcnmedial sqlservr[5130]: /opt/mssql/bin/sqlservr: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.30' not found (required by /opt/mssql/bin/sqlservr)  
    

    In my case, the solution was easy:

    1. Identify and delete Wrong repositories. Use the command: sudo apt search mssql-server
    2. Delete repositories. Note than you need to change bad version and distribution

    sudo add-apt-repository -r 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/**20.04**/mssql-server-2019 focal main'

    1. Add correct repositories: https://learn.microsoft.com/es-es/sql/linux/sql-server-linux-change-repo?view=sql-server-ver16&pivots=ld2-ubuntu
    2. Update repositories: sudo apt update
    3. Upgrade: sudo apt upgrade -y
    4. Check dependencies: sudo apt check mssql-server
    5. Reinstall: sudo apt install -y mssql-server Works fine!!!
      246214-captura-de-pantalla-2022-09-29-154814.png
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.