Closed naveenneog closed 1 year ago
In general global installs should not be forced with sudo
Here is the npm article on your options - https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
I generally prefer the manual option but YMMV https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally#manually-change-npms-default-directory
I usually recommend folks using nvm to install Node.js because installing packages globally just works with nvm without needing to run as root, and it always downloads Node.js from nodejs.org, which is guaranteed to be an official Node.js release.
Your Node.js version (8.10.0) is End-of-Life. llnode tries to follow the Node.js release schedule, therefore the latest llnode version is not supported on Node.js v8. Furthermore, I assume you installed it with apt-get
? apt-get
installation of Node.js from Ubuntu/Debian default repositories is not recommended because those are not considered official Node.js releases, the versions there are heavily outdated and the installation does something that messes with gyp (see https://github.com/nodejs/llnode/issues/355#issuecomment-608160543 for more information).
Can you try installing Node.js with https://github.com/nvm-sh/nvm, and then try installing llnode without sudo?
Updating the node with latest node version did the trick thanks a lot @mmarchini @No9
Same issue in the Centos, upgrading the node version in debian has resolved. But still remains in Centos
[root@c7-naveeng-123 ~]# uname -a
Linux c7-naveeng-123 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@c7-naveeng-123 ~]# node --version
v14.6.0
[root@c7-naveeng-123 ~]# npm --version
6.14.6
[root@c7-naveeng-123 ~]# npm install -g llnode
> llnode@3.2.0 preinstall /root/.nvm/versions/node/v14.6.0/lib/node_modules/llnode
> node scripts/configure.js
sh: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
Build dir is: /root/.nvm/versions/node/v14.6.0/lib/node_modules/llnode
Looking for lldb executable...
Found lldb executable /usr/bin/lldb
Reading lldb version...
Installing llnode for /usr/bin/lldb, lldb version 3.4
Looking for llvm-config for lldb 3.4...
No llvm-config found
Looking for headers for lldb 3.4...
Could not find the headers, will download them later
Looking for shared libraries for lldb 3.4...
/usr/bin/bash: warning: setlocale: LC_ALL: cannot change locale (C.UTF-8)
From ldd: /usr/bin/lldb loads /usr/lib64/llvm/liblldb.so
Found liblldb.so in /usr/lib64/llvm
Cloning lldb release_34 into /root/.nvm/versions/node/v14.6.0/lib/node_modules/llnode/lldb-3.4
fatal: could not create work tree dir '/root/.nvm/versions/node/v14.6.0/lib/node_modules/llnode/lldb-3.4'.: Permission denied
child_process.js:637
throw err;
^
Error: Command failed: git clone --depth 1 --branch release_34 https://github.com/llvm-mirror/lldb.git /root/.nvm/versions/node/v14.6.0/lib/node_modules/llnode/lldb-3.4
at checkExecSyncError (child_process.js:616:11)
at Object.execFileSync (child_process.js:634:15)
at Object.cloneHeaders (/root/.nvm/versions/node/v14.6.0/lib/node_modules/llnode/scripts/lldb.js:47:19)
at configureInstallation (/root/.nvm/versions/node/v14.6.0/lib/node_modules/llnode/scripts/configure.js:89:25)
at main (/root/.nvm/versions/node/v14.6.0/lib/node_modules/llnode/scripts/configure.js:12:34)
at Object.<anonymous> (/root/.nvm/versions/node/v14.6.0/lib/node_modules/llnode/scripts/configure.js:20:1)
at Module._compile (internal/modules/cjs/loader.js:1236:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1257:10)
at Module.load (internal/modules/cjs/loader.js:1085:32)
at Function.Module._load (internal/modules/cjs/loader.js:950:14) {
status: 128,
signal: null,
output: [ null, null, null ],
pid: 32421,
stdout: null,
stderr: null
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! llnode@3.2.0 preinstall: `node scripts/configure.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the llnode@3.2.0 preinstall 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/2020-07-27T08_08_30_744Z-debug.log
[root@c7-naveeng-123 ~]#
You're still installing as root, which is not recommended by npm. If you must install as root, you might need some workaround, but I really recommend you don't install it as root (it will only generate headaches like the error you just saw). The SO question below has some more info:
As this is stale and the resolution has been provided I am going to close. Please open another issue if you require further support.
I am trying to install llnode with lldb for debugging the core files , But unfortunately I am not able to install in any of the environments.
npm -v 3.5.2 node -v v8.10.0