I have tried:
sh-4.2$ rm -rf node_modules/sharp/
sh-4.2$ npm install --build-from-source
npm info it worked if it ends with ok
npm info using [email protected]
npm info using [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info lifecycle [email protected]~preinstall: [email protected]
npm info linkStuff [email protected]
npm info lifecycle [email protected]~install: [email protected]
> [email protected] install /opt/app/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
info sharp Using cached /home/nodejs/.npm/_libvips/libvips-8.7.0-linux-x64.tar.gz
prebuild-install info begin Prebuild-install version 5.2.4
prebuild-install info install --build-from-source specified, not attempting download.
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/opt/app/node_modules/sharp/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/nodejs/.node-gyp/8.9.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/nodejs/.node-gyp/8.9.1',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/nodejs/.node-gyp/8.9.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/opt/app/node_modules/sharp',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/opt/app/node_modules/sharp/build'
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o
CXX(target) Release/obj.target/sharp/src/metadata.o
CXX(target) Release/obj.target/sharp/src/stats.o
CXX(target) Release/obj.target/sharp/src/operations.o
CXX(target) Release/obj.target/sharp/src/pipeline.o
CXX(target) Release/obj.target/sharp/src/sharp.o
CXX(target) Release/obj.target/sharp/src/utilities.o
SOLINK_MODULE(target) Release/obj.target/sharp.node
COPY Release/sharp.node
make: Leaving directory `/opt/app/node_modules/sharp/build'
gyp info ok
npm info lifecycle [email protected]~postinstall: [email protected]
npm info linkStuff [email protected]
npm info lifecycle [email protected]~install: [email protected]
npm info lifecycle [email protected]~postinstall: [email protected]
npm info lifecycle undefined~preshrinkwrap: undefined
npm info lifecycle undefined~shrinkwrap: undefined
npm info lifecycle undefined~postshrinkwrap: undefined
added 1 package in 18.785s
npm info ok
But same error:
2019-02-12T17:46:47.222Z [2756] - verbose: [plugins/fireHook] filter:parse.raw
2019-02-12T17:46:48.808Z [2756] - error: message=/lib64/libz.so.1: version `ZLIB_1.2.9' not found (required by /opt/app/node_modules/sharp/build/Release/../../vendor/lib/libpng16.so.16), stack=Error: /lib64/libz.so.1: version `ZLIB_1.2.9' not found (required by /opt/app/node_modules/sharp/build/Release/../../vendor/lib/libpng16.so.16)
at Object.Module._extensions..node (module.js:664:18)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/opt/app/node_modules/sharp/lib/constructor.js:10:15)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/opt/app/node_modules/sharp/lib/index.js:3:15)
at Module._compile (module.js:635:30)
2019-02-12T17:46:48.810Z [2756] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
io: 2 emit [ 'disconnecting', 'transport close' ]
io: 2 emit [ 'disconnect', 'transport close' ]
2019-02-12T17:46:48.813Z [2756] - info: [app] Web server closed to connections.
2019-02-12T17:46:48.815Z [2756] - info: [app] Database connection closed.
2019-02-12T17:46:48.815Z [2756] - info: [app] Shutdown complete.
[cluster] Child Process (2756) has exited (code: 1, signal: null)
[cluster] Spinning up another process...
2019-02-12T17:46:49.192Z [2767] - info: Initializing NodeBB v1.10.2 https://foro-nodebb-san-marketplace-dev.appls.boae.paas.gsnetcloud.corp