Automattic / Automattic/node-canvas

Cannot get canvas running on CentOS 7

Open
#1,796 26 comments 21 reactions 0 assignees View on GitHub
Installation help
Dominant language
JavaScript
Stars
10.7k
Forks
1.2k
Avg merge
4d 8h
Merged PRs (30d)
1

Description

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 `/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. (/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](https://cdn.discordapp.com/emojis/750798008509005895.png?size=16)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.