question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Centos 6.9] Error during installation (unrecognized command line option "-std=gnu++1y")

See original GitHub issue
> sharp@0.20.5 install /www/api/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)

info sharp Detected globally-installed libvips v8.6.4
info sharp Building from source via node-gyp
make: Entering directory `/www/api/node_modules/sharp/build'
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o
cc1plus: error: unrecognized command line option "-std=gnu++1y"
make: *** [Release/obj.target/sharp/src/common.o] Error 1
make: Leaving directory `/www/api/node_modules/sharp/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:237:12)
gyp ERR! System Linux 2.6.32-042stab127.2
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /www/api/node_modules/sharp
gyp ERR! node -v v10.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN web-api@1.0.0 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.20.5 install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.20.5 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2018-06-30T23_02_58_203Z-debug.log

I have gcc 4.8.2 installed:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/rh/devtoolset-2/root/usr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/opt/rh/devtoolset-2/root/usr --mandir=/opt/rh/devtoolset-2/root/usr/share/man --infodir=/opt/rh/devtoolset-2/root/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --enable-languages=c,c++,fortran,lto --enable-plugin --with-linker-hash-style=gnu --enable-initfini-array --disable-libgcj --with-isl=/dev/shm/home/centos/rpm/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/isl-install --with-cloog=/dev/shm/home/centos/rpm/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/cloog-install --with-mpc=/dev/shm/home/centos/rpm/BUILD/gcc-4.8.2-20140120/obj-x86_64-redhat-linux/mpc-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.2 20140120 (Red Hat 4.8.2-15) (GCC)

there is a complete npm log https://gist.github.com/zhepa/a3296b169ac7d1005d643edd0f24c3ce

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

15reactions
wreiskecommented, Jan 16, 2019

CentOS 6.9 work around

yum install devtoolset-7
source scl_source enable devtoolset-7
2reactions
lovellcommented, Jul 1, 2018

Hello, it looks like Node 10 requires gcc 4.9+ for C++14 support - see https://github.com/nodejs/node/pull/16501 and https://github.com/nodejs/node-gyp/issues/1420

This pretty much rules out using native modules with Node 10 on a stock Centos 6 machine.

Given Centos 6 has been in maintenance-only for over a year I’d recommend upgrading the OS if the use of Node 10 is required.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build of sodium-native on CentOS cloud is failing
I have installed in my local account gcc 7.3.0 and I have set LD_LIBRARY_PATH ... unrecognized command line option "-std=gnu++1y" - Red Hat ......
Read more >
unrecognized command line option -fstack-protector-strong
Hello, Trying to upgrade bioconductor hit a problem with vsn. gcc: error: unrecognized command line option -fstack-protector-strong. It seems that "fstack- ...
Read more >
Latest version of Protobuf requires newer GCC and hence is ...
ERROR : Error installing google-protobuf: ERROR: Failed to build gem ... compiling protobuf.c cc1: error: unrecognized command line option ...
Read more >
Boot Options :: CentOS Docs Site
To start the installation with your options, press the Enter key. To return from the boot: ... Forces the installation program to run...
Read more >
Configuration issues on Linux CentOS - Dynare Forum
configure --with-matlab=/usr/local/apps/MATL… ... Installation and Setup ... gfortran: error: unrecognized command line option '-V'
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found