Error: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27'

41,774

You need to deploy into an operation system that is compatible with your build environment. Usually, this means to use the same distribution version. In some cases, it is also possible to deploy on a newer version of the same distribution.

Your version of Ubuntu uses glibc 2.27. Your deployment target uses something earlier, presumably either Heroku-16 or Cedar-14, since you said you are trying to deploy on Heroku. You either have to rebuild your software in a matching build environment (for example, using pbuilder, or using a virtual machine), or deploy into something that is compatible with your version of Ubuntu (presumably, Heroku-18).

Share:
41,774

Related videos on Youtube

joe.kovalski
Author by

joe.kovalski

Passionate of new technologies. Constantly increasing skills in mathematics.

Updated on February 11, 2020

Comments

  • joe.kovalski
    joe.kovalski about 4 years

    I am building my node module (using N-API) both for Mac (10.9+) and Linux (Ubuntu 18). When I am deploying my module to remote machine (to Heroku), I am getting:

    Error: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /opt/atlassian/pipelines/agent/build/addons/Release-linux/module.node)
        at Object.Module._extensions..node (internal/modules/cjs/loader.js:717:18)
        at Module.load (internal/modules/cjs/loader.js:598:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
        (...)
    

    Running ldd --version on both machines:

    ~ $ ldd --version
    ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
    

    and:

    ~ $ ls /lib/x86_64-linux-gnu/
    libm.so.6 (...)
    

    Also, I am not sure why linking to libm is necessary, as I am not using #include <math.h> within my code (compiler is adding libm implicitly?).

    Any help would be appreciated.

  • joe.kovalski
    joe.kovalski about 5 years
    Interesting. I've downloaded the heroku-18 docker image (this is my stack on Heroku), compiled the module under that stack, but still getting the same error.
  • joe.kovalski
    joe.kovalski about 5 years
    Quoting: "Your deployment target uses something earlier, presumably either Heroku-16 or Cedar-14" - my deployment target is heroku-18, and ldd --version says there is a ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
  • Florian Weimer
    Florian Weimer about 5 years
    libm from glibc 2.27 definitely has GLIBC_2.27 symbol versions, so either the Heroku image is corrupted, or you are not deploying with the right configuration (so that you end up with something else). Perhaps this is a case for Heroku customer support?
  • joe.kovalski
    joe.kovalski about 5 years
    Looks like the Heroku image was corrupted, the module works when built with heroku-16