Skip to content

Cannot get canvas running on CentOS 7 #1796

@Commandtechno

Description

@Commandtechno

I have been trying to get node canvas to work on CentOS 7 yet I keep getting this error that libstdc.6.so version CXXABI 1.3.9 is not found, from checking the version with strings /lib64/libstdc++.so.6 | grep CXXABI it lists the versions from 1.3 to 1.3.7. I found 1.3 - 1.3.10 in <project directory>/node_modules/canvas/build/Release/libstdc.so.6. I was wondering if anybody has had similar issues and know a fix, a way to redirect it to use that file (I tried LD_LIBRARY_PATH, but it didn't seem to do anything), or anything that could help. I also have the full console log below if it helps.

Issue or Feature

[server]$ node .
node:internal/modules/cjs/loader:1161
  return process.dlopen(module, path.toNamespacedPath(filename));
                 ^

Error: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/username/server/node_modules/canvas/build/Release/canvas.node)
    at Object.Module._extensions..node (node:internal/modules/cjs/loader:1161:18)
    at Module.load (node:internal/modules/cjs/loader:967:32)
    at Function.Module._load (node:internal/modules/cjs/loader:807:14)
    at Module.require (node:internal/modules/cjs/loader:991:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/home/username/server/node_modules/canvas/lib/bindings.js:3:18)
    at Module._compile (node:internal/modules/cjs/loader:1102:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1131:10)
    at Module.load (node:internal/modules/cjs/loader:967:32)
    at Function.Module._load (node:internal/modules/cjs/loader:807:14) {
  code: 'ERR_DLOPEN_FAILED'
}

Steps to Reproduce

const canvas = require('canvas')
npm i canvas
node .

Your Environment

  • Version of node-canvas (output of npm list canvas or yarn list canvas): canvas@2.7.0
  • Environment (e.g. node 4.2.0 on Mac OS X 10.8):
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"

ty image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions