'pyinstaller GLIBC_2.25 not found, however another script works

I created an executable out of a simple Python script, using pyinstaller on Ubuntu 18.04, and tested it in a different computer (also with Ubutnu 18) and worked perfectly.

However when trying the same with a more complex script (more library imports) the executable fails in the other computer with the error

   ImportError: /lob/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.25' not found

This can't be a Python incompatibility (see https://github.com/pyinstaller/pyinstaller/issues/4758), as the other script did work fine. So it most probably is based on some of the libraries the second script imports.

How can I include the libraries imported in the executable made by Pyinstaller (if that is even the origin of this error)?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source