flutterubuntuglibcdrift

`GLIBC_2.34' not found at start Flutter app in Ubuntu 18.04


I made (build release) Flutter app in Linux Mint 21.2 and app is run ok. And app is run ok in Ubuntu 22.04. But in Ubuntu 18.04, 20.04 I have got errors:

./dkc: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by ./dkc)
./dkc: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /home/alex/Рабочий стол/Linux release 20231207/lib/libsqlite3_flutter_libs_plugin.so)
./dkc: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /home/alex/Рабочий стол/Linux release 20231207/lib/libsqlite3_flutter_libs_plugin.so)
./dkc: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/alex/Рабочий стол/Linux release 20231207/lib/libsqlite3_flutter_libs_plugin.so)
./dkc: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/alex/Рабочий стол/Linux release 20231207/lib/libsqlite3_flutter_libs_plugin.so)

My pubspec.yaml dependencies:

environment:
  sdk: ">=3.0.5 <4.0.0"

dependencies:
  flutter:
    sdk: flutter

  connectivity_plus: ^5.0.2
  cupertino_icons: ^1.0.6
  darq: ^2.0.0
  device_info_plus: ^9.1.1
  dio: ^5.4.0
  docx_template: ^0.4.0
  drift: ^2.14.1
  dropdown_button2: ^2.3.9
  excel: ^4.0.0
  file_picker: ^6.1.1
  flutter_window_close: ^1.0.0
  get: ^4.6.6
  intl: ^0.19.0
  package_info_plus: ^5.0.1
  package_rename: ^1.5.0
  path: ^1.8.3
  path_provider: ^2.1.1
  pdf: ^3.10.6
  printing: ^5.11.1
  sqlite3_flutter_libs: ^0.5.18

dev_dependencies:
  flutter_test:
    sdk: flutter

  build_runner: ^2.4.7
  drift_dev: ^2.14.1
  flutter_launcher_icons: ^0.13.1
  flutter_lints: ^3.0.1

Ubuntu 18.04 bash:

apt policy libc6
libc6:
  Установлен: 2.27-3ubuntu1.6
  Кандидат:   2.27-3ubuntu1.6
  Таблица версий:
 *** 2.27-3ubuntu1.6 500
        500 http://ru.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.27-3ubuntu1.5 500
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
     2.27-3ubuntu1 500
        500 http://ru.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

How can I resolve errors? Thanks.

Tried to update libc6, but new version not found. Tried to use How to install GLIBC 2.29 or higher in Ubuntu 18.04, but not helped me.


Solution

  • How can I resolve errors?

    The easiest way to resolve this is to build your application on the lowest version of GLIBC you plan to support (Ubuntu 18.04 here).

    If you can't do that, you would need to make your application use alternate (non-system) installation of GLIBC, which is complicated and fraught with peril when done incorrectly.

    Tried to use How to install GLIBC 2.29 or higher in Ubuntu 18.04, but not helped me.

    That answer tells you how to install GLIBC into /opt/glibc and then redirects to a different answer on how to make your application use that newly-installed version.

    I am guessing you've skipped the second step.