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.

SOLVED :: apify install problem - better-sqlite3 problem

See original GitHub issue

Dear all, am installing apify on oy Linux 7.5 64x box node v14.17.6 Python 3.7

I have this error npm i better-sqlite3 Please advise how can I install apify

> better-sqlite3@7.4.3 install /home/beshoo/public_html/google-map/crawler-google-places-master/node_modules/better-sqlite3
> prebuild-install || npm run build-release

prebuild-install WARN install /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/beshoo/public_html/google-map/crawler-google-places-master/node_modules/better-sqlite3/build/Release/better_sqlite3.node)

> better-sqlite3@7.4.3 build-release /home/beshoo/public_html/google-map/crawler-google-places-master/node_modules/better-sqlite3
> node-gyp rebuild --release

make: Entering directory `/home/beshoo/public_html/google-map/crawler-google-places-master/node_modules/better-sqlite3/build'
  TOUCH b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
  ACTION deps_sqlite3_gyp_locate_sqlite3_target_extract_sqlite3 b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
  TOUCH Release/obj.target/deps/locate_sqlite3.stamp
  CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o
  AR(target) Release/obj.target/deps/sqlite3.a
  COPY Release/sqlite3.a
  CXX(target) Release/obj.target/better_sqlite3/src/better_sqlite3.o
g++: error: unrecognized command line option ‘-std=c++14’
make: *** [Release/obj.target/better_sqlite3/src/better_sqlite3.o] Error 1
rm b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
make: Leaving directory `/home/beshoo/public_html/google-map/crawler-google-places-master/node_modules/better-sqlite3/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 3.10.0-962.3.2.lve1.5.42.el7.x86_64
gyp ERR! command "/usr/local/lib/nodejs/bin/node" "/usr/local/lib/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/beshoo/public_html/google-map/crawler-google-places-master/node_modules/better-sqlite3
gyp ERR! node -v v14.17.6
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3@7.4.3 build-release: `node-gyp rebuild --release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3@7.4.3 build-release script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-09-14T22_45_01_375Z-debug.log
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! better-sqlite3@7.4.3 install: `prebuild-install || npm run build-release`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the better-sqlite3@7.4.3 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/2021-09-14T22_45_01_795Z-debug.log

node-gyp rebuild --release


[MAX]root:[/home/beshoo/www/google-map/crawler-google-places-master]node-gyp rebuild --release
gyp info it worked if it ends with ok
gyp info using node-gyp@8.2.0
gyp info using node@14.17.6 | linux | x64
gyp info find Python using Python version 3.7.2 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/usr/local/lib/nodejs/lib/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   '/home/beshoo/public_html/google-map/crawler-google-places-master/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/nodejs/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/root/.cache/node-gyp/14.17.6/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/root/.cache/node-gyp/14.17.6',
gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/nodejs/lib/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/root/.cache/node-gyp/14.17.6/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/beshoo/public_html/google-map/crawler-google-places-master',
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 args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory `/home/beshoo/public_html/google-map/crawler-google-places-master/build'
make: *** No rule to make target `Release/obj.target/binding/src/binding.o', needed by `Release/obj.target/binding.node'.  Stop.
make: Leaving directory `/home/beshoo/public_html/google-map/crawler-google-places-master/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/nodejs/lib/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 3.10.0-962.3.2.lve1.5.42.el7.x86_64
gyp ERR! command "/usr/local/lib/nodejs/bin/node" "/usr/local/lib/nodejs/bin/node-gyp" "rebuild" "--release"
gyp ERR! cwd /home/beshoo/public_html/google-map/crawler-google-places-master
gyp ERR! node -v v14.17.6
gyp ERR! node-gyp -v v8.2.0
gyp ERR! not ok
[MAX]root:[/home/beshoo/www/google-map/crawler-google-places-master]

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
beshoocommented, Sep 16, 2021

@B4nan, again, thank you for your reply. finally being able to solve this problem. and here is how for anyone interested: First, search the server for GLIBCXX before updating GCC…

for OUTPUT in $(locate libstdc++.so)
do
        echo  $OUTPUT
        echo `strings ${OUTPUT} | grep GLIBCXX_3.4.20`
done

in my case I have this path “/usr/lib64/c+±plesk-6.3.0/lib64/” this will locate all libstdc++.so on the server, search for the reported version “GLIBCXX_3.4.20” and then, export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/c++-plesk-6.3.0/lib64/

and I add this command in the .bashrc

0reactions
B4nancommented, Sep 16, 2021

Nope, that is currently not possible. We do plan to add more abstraction over the storage implementation in next major release - but it will probably take several months to get there, and you would still probably need to provide your own implementation of the storage.

I am closing this as there is not much we can do, the issue is in your system (and potentically in better-sqlite3 library), not directly with the apify SDK.

I peeked at the other issue, and if you would be able to install better-sqlite3 directly, we can definitely ship new version of better-sqlite3-with-prebuilds that matches the latest version of better-sqlite3.

If you can’t upgrade your system, you might wanna use docker, or run things on the apify platform.

Btw I would even expect the very same problems with node-sqlite3 (the library you call “standard”, but there is not much standard about it, it’s just a different implementation). Quick google search showed things like this:

https://stackoverflow.com/questions/66178113/cant-install-sqlite3-on-centos-7

Read more comments on GitHub >

github_iconTop Results From Across the Web

SOLVED :: Installing Problem on Linux 7.9 · Issue #696 · WiseLibs ...
Linux 7.5 64x box node v14.17.6 Python 3.7 I have this error while installing better-sqlite3 npm i better-sqlite3 Please advise how can I...
Read more >
when i try to use npm i apify command i get 243 error
Solved for me: In my case the problem was that npm was started with a user that does not have a home directory....
Read more >
API client for JavaScript · Apify Documentation
Full documentation of the apify-client NPM package version master, which simplifies access to the Apify API using JavaScript / Node.js.
Read more >
apify-client - npm
This library implements a JavaScript / Node.js client for the Apify API. The main philosophy is that the library is just a thin...
Read more >
Apifier - Bountysource
I try to use preNavigationHooks , it throws Error: Unknown value for options. ... I'm getting 4 moderate severity vulnerabilities on a new...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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