For anyone else finding this, Node 18 (and beyond) is built against RHEL8 . The GLIB requirement isn’t backwards compatible. You’ll need to target ubuntu 20, 22 and beyond to build successfully.
Info on supported environments and how to change the default target: The Ubuntu Linux Build Environments - Travis CI