Closed davros123 closed 5 years ago
Hi! The Node.JS version at Ubuntu/Debian repos is pretty old and won't work.
I see you've also tried with Node v10 and it fails as well. The problem is in the node-pty
package.
Try doing npm install node-pty
and if that fails, do cd node_modules/node-pty; node scripts/install.js
and post its output.
Thankyou for the reply!!! (I did install 10 to a fresh U16.04 server VM and it also failed in the same way). I have done it again on a fresh install and still have an issue that there is no node-pty.
apt install -y make python build-essential
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
npm -v <---(confirmed none installed)
node -v <---(confirmed none installed)
apt-get install nodejs
npm -v
node -v
git clone https://github.com/botgram/shell-bot.git && cd shell-bot
npm install
this fails with the following....
root@Ubuntu16:~# uname -a
Linux Ubuntu16 4.4.0-143-generic #169-Ubuntu SMP Thu Feb 7 07:56:38 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
root@Ubuntu16:~#
root@Ubuntu16:~# npm -v
6.4.1
root@Ubuntu16:~# node -v
v10.15.3
root@Ubuntu16:~/shell-bot# npm install
> node-pty@0.8.1 install /root/shell-bot/node_modules/node-pty
> node scripts/install.js
internal/modules/cjs/loader.js:584
throw err;
^
Error: Cannot find module '/root/shell-bot/node_modules/node-pty/scripts/install.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-pty@0.8.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-pty@0.8.1 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/2019-03-27T01_42_01_996Z-debug.log
root@Ubuntu16:~/shell-bot#
npm install node-pty fails with the following
root@Ubuntu16:~/shell-bot# npm install node-pty
> node-pty@0.8.1 install /root/shell-bot/node_modules/node-pty
> node scripts/install.js
internal/modules/cjs/loader.js:584
throw err;
^
Error: Cannot find module '/root/shell-bot/node_modules/node-pty/scripts/install.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-pty@0.8.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-pty@0.8.1 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/2019-03-27T01_30_09_088Z-debug.log
root@Ubuntu16:~/shell-bot#
I can not run "cd node_modules/node-pty; node scripts/install.js" as there is no node_modules/node-pty directory. There is no "node-pty"
root@Ubuntu16:~/shell-bot# find / -name "node-pty"
root@Ubuntu16:~/shell-bot#
root@Ubuntu16:~/shell-bot# find / -name "install.js"
/usr/lib/node_modules/npm/node_modules/node-gyp/lib/install.js
/usr/lib/node_modules/npm/node_modules/npm-audit-report/reporters/install.js
/usr/lib/node_modules/npm/lib/install/action/install.js
/usr/lib/node_modules/npm/lib/install.js
/root/shell-bot/node_modules/node-termios/install.js
root@Ubuntu16:~/shell-bot#
root@Ubuntu16:~/shell-bot# find / -name "node_modules"
/usr/lib/node_modules
/usr/lib/node_modules/npm/node_modules
/usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/node_modules
/usr/lib/node_modules/npm/node_modules/node-gyp/node_modules
/usr/lib/node_modules/npm/node_modules/pumpify/node_modules
/usr/lib/node_modules/npm/node_modules/debug/node_modules
/usr/lib/node_modules/npm/node_modules/libnpmhook/node_modules
/usr/lib/node_modules/npm/node_modules/wrap-ansi/node_modules
/usr/lib/node_modules/npm/node_modules/string-width/node_modules
/usr/lib/node_modules/npm/node_modules/gauge/node_modules
/usr/lib/node_modules/npm/node_modules/npm-registry-client/node_modules
/usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules
/usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules
/usr/lib/node_modules/npm/node_modules/wide-align/node_modules
/usr/lib/node_modules/npm/node_modules/minipass/node_modules
/usr/lib/node_modules/npm/node_modules/tar/node_modules
/usr/lib/node_modules/npm/node_modules/promise-retry/node_modules
/usr/lib/node_modules/npm/node_modules/cliui/node_modules
/usr/lib/node_modules/npm/node_modules/yargs/node_modules
/usr/lib/node_modules/npm/node_modules/gentle-fs/node_modules
/usr/lib/node_modules/npm/node_modules/copy-concurrently/node_modules
/usr/lib/node_modules/npm/node_modules/rc/node_modules
/usr/lib/node_modules/npm/node_modules/sorted-union-stream/node_modules
/root/shell-bot/node_modules
root@Ubuntu16:~/shell-bot#
FYI - here are the build essentials log output and the NodeJS.10
root@Ubuntu16:~# apt install -y make python build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
binutils cpp cpp-5 dpkg-dev fakeroot g++ g++-5 gcc gcc-5 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan2 libatomic1 libc-dev-bin libc6-dev
libcc1-0 libcilkrts5 libdpkg-perl libfakeroot libfile-fcntllock-perl libgcc-5-dev libgomp1 libisl15 libitm1 liblsan0 libmpc3 libmpx0 libpython-stdlib libpython2.7-minimal
libpython2.7-stdlib libquadmath0 libstdc++-5-dev libtsan0 libubsan0 linux-libc-dev manpages-dev python-minimal python2.7 python2.7-minimal
Suggested packages:
binutils-doc cpp-doc gcc-5-locales debian-keyring g++-multilib g++-5-multilib gcc-5-doc libstdc++6-5-dbg gcc-multilib autoconf automake libtool flex bison gdb gcc-doc
gcc-5-multilib libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan2-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx0-dbg libquadmath0-dbg
glibc-doc libstdc++-5-doc make-doc python-doc python-tk python2.7-doc binfmt-support
The following NEW packages will be installed:
binutils build-essential cpp cpp-5 dpkg-dev fakeroot g++ g++-5 gcc gcc-5 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan2 libatomic1
libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libdpkg-perl libfakeroot libfile-fcntllock-perl libgcc-5-dev libgomp1 libisl15 libitm1 liblsan0 libmpc3 libmpx0 libpython-stdlib
libpython2.7-minimal libpython2.7-stdlib libquadmath0 libstdc++-5-dev libtsan0 libubsan0 linux-libc-dev make manpages-dev python python-minimal python2.7 python2.7-minimal
0 to upgrade, 43 to newly install, 0 to remove and 12 not to upgrade.
Need to get 42.0 MB of archives.
After this operation, 160 MB of additional disk space will be used.
Get:1 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-minimal amd64 2.7.12-1ubuntu0~16.04.4 [339 kB]
Get:2 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7-minimal amd64 2.7.12-1ubuntu0~16.04.4 [1,261 kB]
Get:3 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python-minimal amd64 2.7.12-1~16.04 [28.1 kB]
Get:4 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython2.7-stdlib amd64 2.7.12-1ubuntu0~16.04.4 [1,880 kB]
Get:5 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python2.7 amd64 2.7.12-1ubuntu0~16.04.4 [224 kB]
Get:6 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython-stdlib amd64 2.7.12-1~16.04 [7,768 B]
Get:7 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 python amd64 2.7.12-1~16.04 [137 kB]
Get:8 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 libmpc3 amd64 1.0.3-1 [39.7 kB]
Get:9 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 binutils amd64 2.26.1-1ubuntu1~16.04.8 [2,312 kB]
Get:10 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc-dev-bin amd64 2.23-0ubuntu11 [68.5 kB]
Get:11 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-libc-dev amd64 4.4.0-143.169 [870 kB]
Get:12 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libc6-dev amd64 2.23-0ubuntu11 [2,086 kB]
Get:13 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 libisl15 amd64 0.16.1-1 [524 kB]
Get:14 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 cpp-5 amd64 5.4.0-6ubuntu1~16.04.11 [7,660 kB]
Get:15 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 cpp amd64 4:5.3.1-1ubuntu1 [27.7 kB]
Get:16 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcc1-0 amd64 5.4.0-6ubuntu1~16.04.11 [38.8 kB]
Get:17 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgomp1 amd64 5.4.0-6ubuntu1~16.04.11 [55.0 kB]
Get:18 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libitm1 amd64 5.4.0-6ubuntu1~16.04.11 [27.4 kB]
Get:19 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libatomic1 amd64 5.4.0-6ubuntu1~16.04.11 [8,896 B]
Get:20 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libasan2 amd64 5.4.0-6ubuntu1~16.04.11 [264 kB]
Get:21 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 liblsan0 amd64 5.4.0-6ubuntu1~16.04.11 [105 kB]
Get:22 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libtsan0 amd64 5.4.0-6ubuntu1~16.04.11 [244 kB]
Get:23 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libubsan0 amd64 5.4.0-6ubuntu1~16.04.11 [95.4 kB]
Get:24 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcilkrts5 amd64 5.4.0-6ubuntu1~16.04.11 [40.1 kB]
Get:25 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libmpx0 amd64 5.4.0-6ubuntu1~16.04.11 [9,748 B]
Get:26 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libquadmath0 amd64 5.4.0-6ubuntu1~16.04.11 [131 kB]
Get:27 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgcc-5-dev amd64 5.4.0-6ubuntu1~16.04.11 [2,229 kB]
Get:28 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 gcc-5 amd64 5.4.0-6ubuntu1~16.04.11 [8,417 kB]
Get:29 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 gcc amd64 4:5.3.1-1ubuntu1 [5,244 B]
Get:30 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libstdc++-5-dev amd64 5.4.0-6ubuntu1~16.04.11 [1,426 kB]
Get:31 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 g++-5 amd64 5.4.0-6ubuntu1~16.04.11 [8,310 kB]
Get:32 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 g++ amd64 4:5.3.1-1ubuntu1 [1,504 B]
Get:33 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 make amd64 4.1-6 [151 kB]
Get:34 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdpkg-perl all 1.18.4ubuntu1.5 [195 kB]
Get:35 http://au.archive.ubuntu.com/ubuntu xenial-updates/main amd64 dpkg-dev all 1.18.4ubuntu1.5 [584 kB]
Get:36 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 build-essential amd64 12.1ubuntu2 [4,758 B]
Get:37 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 libfakeroot amd64 1.20.2-1ubuntu1 [25.5 kB]
Get:38 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 fakeroot amd64 1.20.2-1ubuntu1 [61.8 kB]
Get:39 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-perl all 1.19.03-1 [47.6 kB]
Get:40 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-diff-xs-perl amd64 0.04-4build1 [11.0 kB]
Get:41 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 libalgorithm-merge-perl all 0.08-3 [12.0 kB]
Get:42 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 libfile-fcntllock-perl amd64 0.22-3 [32.0 kB]
Get:43 http://au.archive.ubuntu.com/ubuntu xenial/main amd64 manpages-dev all 4.04-2 [2,048 kB]
Fetched 42.0 MB in 57s (733 kB/s)
Extracting templates from packages: 100%
Selecting previously unselected package libpython2.7-minimal:amd64.
(Reading database ... 97446 files and directories currently installed.)
Preparing to unpack .../libpython2.7-minimal_2.7.12-1ubuntu0~16.04.4_amd64.deb ...
Unpacking libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.4) ...
Selecting previously unselected package python2.7-minimal.
Preparing to unpack .../python2.7-minimal_2.7.12-1ubuntu0~16.04.4_amd64.deb ...
Unpacking python2.7-minimal (2.7.12-1ubuntu0~16.04.4) ...
Selecting previously unselected package python-minimal.
Preparing to unpack .../python-minimal_2.7.12-1~16.04_amd64.deb ...
Unpacking python-minimal (2.7.12-1~16.04) ...
Selecting previously unselected package libpython2.7-stdlib:amd64.
Preparing to unpack .../libpython2.7-stdlib_2.7.12-1ubuntu0~16.04.4_amd64.deb ...
Unpacking libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.4) ...
Selecting previously unselected package python2.7.
Preparing to unpack .../python2.7_2.7.12-1ubuntu0~16.04.4_amd64.deb ...
Unpacking python2.7 (2.7.12-1ubuntu0~16.04.4) ...
Selecting previously unselected package libpython-stdlib:amd64.
Preparing to unpack .../libpython-stdlib_2.7.12-1~16.04_amd64.deb ...
Unpacking libpython-stdlib:amd64 (2.7.12-1~16.04) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.4) ...
Setting up python2.7-minimal (2.7.12-1ubuntu0~16.04.4) ...
Linking and byte-compiling packages for runtime python2.7...
Setting up python-minimal (2.7.12-1~16.04) ...
Selecting previously unselected package python.
(Reading database ... 98192 files and directories currently installed.)
Preparing to unpack .../python_2.7.12-1~16.04_amd64.deb ...
Unpacking python (2.7.12-1~16.04) ...
Selecting previously unselected package libmpc3:amd64.
Preparing to unpack .../libmpc3_1.0.3-1_amd64.deb ...
Unpacking libmpc3:amd64 (1.0.3-1) ...
Selecting previously unselected package binutils.
Preparing to unpack .../binutils_2.26.1-1ubuntu1~16.04.8_amd64.deb ...
Unpacking binutils (2.26.1-1ubuntu1~16.04.8) ...
Selecting previously unselected package libc-dev-bin.
Preparing to unpack .../libc-dev-bin_2.23-0ubuntu11_amd64.deb ...
Unpacking libc-dev-bin (2.23-0ubuntu11) ...
Selecting previously unselected package linux-libc-dev:amd64.
Preparing to unpack .../linux-libc-dev_4.4.0-143.169_amd64.deb ...
Unpacking linux-libc-dev:amd64 (4.4.0-143.169) ...
Selecting previously unselected package libc6-dev:amd64.
Preparing to unpack .../libc6-dev_2.23-0ubuntu11_amd64.deb ...
Unpacking libc6-dev:amd64 (2.23-0ubuntu11) ...
Selecting previously unselected package libisl15:amd64.
Preparing to unpack .../libisl15_0.16.1-1_amd64.deb ...
Unpacking libisl15:amd64 (0.16.1-1) ...
Selecting previously unselected package cpp-5.
Preparing to unpack .../cpp-5_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking cpp-5 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package cpp.
Preparing to unpack .../cpp_4%3a5.3.1-1ubuntu1_amd64.deb ...
Unpacking cpp (4:5.3.1-1ubuntu1) ...
Selecting previously unselected package libcc1-0:amd64.
Preparing to unpack .../libcc1-0_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libgomp1:amd64.
Preparing to unpack .../libgomp1_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libgomp1:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libitm1:amd64.
Preparing to unpack .../libitm1_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libitm1:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libatomic1:amd64.
Preparing to unpack .../libatomic1_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libatomic1:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libasan2:amd64.
Preparing to unpack .../libasan2_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libasan2:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package liblsan0:amd64.
Preparing to unpack .../liblsan0_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking liblsan0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libtsan0:amd64.
Preparing to unpack .../libtsan0_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libtsan0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libubsan0:amd64.
Preparing to unpack .../libubsan0_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libubsan0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libcilkrts5:amd64.
Preparing to unpack .../libcilkrts5_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libmpx0:amd64.
Preparing to unpack .../libmpx0_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libmpx0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libquadmath0:amd64.
Preparing to unpack .../libquadmath0_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package libgcc-5-dev:amd64.
Preparing to unpack .../libgcc-5-dev_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package gcc-5.
Preparing to unpack .../gcc-5_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking gcc-5 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package gcc.
Preparing to unpack .../gcc_4%3a5.3.1-1ubuntu1_amd64.deb ...
Unpacking gcc (4:5.3.1-1ubuntu1) ...
Selecting previously unselected package libstdc++-5-dev:amd64.
Preparing to unpack .../libstdc++-5-dev_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package g++-5.
Preparing to unpack .../g++-5_5.4.0-6ubuntu1~16.04.11_amd64.deb ...
Unpacking g++-5 (5.4.0-6ubuntu1~16.04.11) ...
Selecting previously unselected package g++.
Preparing to unpack .../g++_4%3a5.3.1-1ubuntu1_amd64.deb ...
Unpacking g++ (4:5.3.1-1ubuntu1) ...
Selecting previously unselected package make.
Preparing to unpack .../archives/make_4.1-6_amd64.deb ...
Unpacking make (4.1-6) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../libdpkg-perl_1.18.4ubuntu1.5_all.deb ...
Unpacking libdpkg-perl (1.18.4ubuntu1.5) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../dpkg-dev_1.18.4ubuntu1.5_all.deb ...
Unpacking dpkg-dev (1.18.4ubuntu1.5) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../build-essential_12.1ubuntu2_amd64.deb ...
Unpacking build-essential (12.1ubuntu2) ...
Selecting previously unselected package libfakeroot:amd64.
Preparing to unpack .../libfakeroot_1.20.2-1ubuntu1_amd64.deb ...
Unpacking libfakeroot:amd64 (1.20.2-1ubuntu1) ...
Selecting previously unselected package fakeroot.
Preparing to unpack .../fakeroot_1.20.2-1ubuntu1_amd64.deb ...
Unpacking fakeroot (1.20.2-1ubuntu1) ...
Selecting previously unselected package libalgorithm-diff-perl.
Preparing to unpack .../libalgorithm-diff-perl_1.19.03-1_all.deb ...
Unpacking libalgorithm-diff-perl (1.19.03-1) ...
Selecting previously unselected package libalgorithm-diff-xs-perl.
Preparing to unpack .../libalgorithm-diff-xs-perl_0.04-4build1_amd64.deb ...
Unpacking libalgorithm-diff-xs-perl (0.04-4build1) ...
Selecting previously unselected package libalgorithm-merge-perl.
Preparing to unpack .../libalgorithm-merge-perl_0.08-3_all.deb ...
Unpacking libalgorithm-merge-perl (0.08-3) ...
Selecting previously unselected package libfile-fcntllock-perl.
Preparing to unpack .../libfile-fcntllock-perl_0.22-3_amd64.deb ...
Unpacking libfile-fcntllock-perl (0.22-3) ...
Selecting previously unselected package manpages-dev.
Preparing to unpack .../manpages-dev_4.04-2_all.deb ...
Unpacking manpages-dev (4.04-2) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
Setting up libpython2.7-stdlib:amd64 (2.7.12-1ubuntu0~16.04.4) ...
Setting up python2.7 (2.7.12-1ubuntu0~16.04.4) ...
Setting up libpython-stdlib:amd64 (2.7.12-1~16.04) ...
Setting up python (2.7.12-1~16.04) ...
Setting up libmpc3:amd64 (1.0.3-1) ...
Setting up binutils (2.26.1-1ubuntu1~16.04.8) ...
Setting up libc-dev-bin (2.23-0ubuntu11) ...
Setting up linux-libc-dev:amd64 (4.4.0-143.169) ...
Setting up libc6-dev:amd64 (2.23-0ubuntu11) ...
Setting up libisl15:amd64 (0.16.1-1) ...
Setting up cpp-5 (5.4.0-6ubuntu1~16.04.11) ...
Setting up cpp (4:5.3.1-1ubuntu1) ...
Setting up libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libgomp1:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libitm1:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libatomic1:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libasan2:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up liblsan0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libtsan0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libubsan0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libmpx0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up gcc-5 (5.4.0-6ubuntu1~16.04.11) ...
Setting up gcc (4:5.3.1-1ubuntu1) ...
Setting up libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.11) ...
Setting up g++-5 (5.4.0-6ubuntu1~16.04.11) ...
Setting up g++ (4:5.3.1-1ubuntu1) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up make (4.1-6) ...
Setting up libdpkg-perl (1.18.4ubuntu1.5) ...
Setting up dpkg-dev (1.18.4ubuntu1.5) ...
Setting up build-essential (12.1ubuntu2) ...
Setting up libfakeroot:amd64 (1.20.2-1ubuntu1) ...
Setting up fakeroot (1.20.2-1ubuntu1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up libalgorithm-diff-perl (1.19.03-1) ...
Setting up libalgorithm-diff-xs-perl (0.04-4build1) ...
Setting up libalgorithm-merge-perl (0.08-3) ...
Setting up libfile-fcntllock-perl (0.22-3) ...
Setting up manpages-dev (4.04-2) ...
Processing triggers for libc-bin (2.23-0ubuntu11) ...
root@Ubuntu16:~#
root@Ubuntu16:~# curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
## Installing the NodeSource Node.js 10.x repo...
## Populating apt-get cache...
+ apt-get update
Hit:1 http://repo.zabbix.com/zabbix/4.0/ubuntu xenial InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Hit:3 http://au.archive.ubuntu.com/ubuntu xenial InRelease
Hit:4 http://au.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:5 http://au.archive.ubuntu.com/ubuntu xenial-backports InRelease
Fetched 109 kB in 3s (28.3 kB/s)
Reading package lists... Done
## Confirming "xenial" is supported...
+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_10.x/dists/xenial/Release'
## Adding the NodeSource signing key to your keyring...
+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
OK
## Creating apt sources list file for the NodeSource Node.js 10.x repo...
+ echo 'deb https://deb.nodesource.com/node_10.x xenial main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src https://deb.nodesource.com/node_10.x xenial main' >> /etc/apt/sources.list.d/nodesource.list
## Running `apt-get update` for you...
+ apt-get update
Get:1 https://deb.nodesource.com/node_10.x xenial InRelease [4,584 B]
Hit:2 http://repo.zabbix.com/zabbix/4.0/ubuntu xenial InRelease
Get:3 https://deb.nodesource.com/node_10.x xenial/main amd64 Packages [767 B]
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:5 http://au.archive.ubuntu.com/ubuntu xenial InRelease
Hit:6 http://au.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:7 http://au.archive.ubuntu.com/ubuntu xenial-backports InRelease
Fetched 5,351 B in 1s (3,002 B/s)
Reading package lists... Done
## Run `sudo apt-get install -y nodejs` to install Node.js 10.x and npm
## You may also need development tools to build native addons:
sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
I've tried to reproduce your problem (but on an Ubuntu 16.04 container, not a VM) using your steps:
apt install -y make python build-essential curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - npm -v <---(confirmed none installed) node -v <---(confirmed none installed) apt-get install nodejs npm -v node -v git clone https://github.com/botgram/shell-bot.git && cd shell-bot npm install
And it works correctly :thinking:
root@467e298f1d3b:~# npm -v
6.4.1
root@467e298f1d3b:~# node -v
v10.15.3
root@467e298f1d3b:~# git clone https://github.com/botgram/shell-bot.git && cd shell-bot
Cloning into 'shell-bot'...
remote: Enumerating objects: 153, done.
remote: Counting objects: 100% (153/153), done.
remote: Compressing objects: 100% (77/77), done.
remote: Total 264 (delta 79), reused 146 (delta 76), pack-reused 111
Receiving objects: 100% (264/264), 76.51 KiB | 0 bytes/s, done.
Resolving deltas: 100% (166/166), done.
Checking connectivity... done.
root@467e298f1d3b:~/shell-bot# npm install
> node-pty@0.8.1 install /root/shell-bot/node_modules/node-pty
> node scripts/install.js
make: Entering directory '/root/shell-bot/node_modules/node-pty/build'
CXX(target) Release/obj.target/pty/src/unix/pty.o
[...]
So I'm pretty lost for options. It seems npm isn't correctly extracting the packages... you could try to npm install --ignore-scripts
and see if at least you node-pty
exists and you can run node scripts/install.js
there manually.
Thanks. I am running on ESXI 6 as a VM but it should not matter. I get the same error on Ubuntu 16.04 Desktop and Server editions. I also tried Ubuntu 18 server and got the same error :(
npm ERR! Linux 4.15.0-46-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! node-pty@0.8.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-pty@0.8.1 install script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-pty package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-pty
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-pty
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /root/shell-bot/npm-debug.log
root@server18s:~/shell-bot#
ok. I think I have identified the issue! I was running these as root. Running as user worked! YAY!
git clone https://github.com/botgram/shell-bot.git && cd shell-bot
npm install
I thought about that, but I also ran them as root at my container and everything was good :thinking: Anyway, glad it works for you :)
API TOKEN
Hi I am trying to build on Ubuntu 16.04 with node v4.2.6 and npm v3.5.2 I installed v10.15.3 and npm 6.4.1 and got the same issue.
48 apt install -y make python build-essential 49 npm -v 50 sudo apt-get install nodejs 51 sudo apt-get install nodejs-legacy 52 sudo apt-get install npm 53 git clone https://github.com/botgram/shell-bot.git && cd shell-bot 54 npm install
And I get the following error:
root@Ubuntu16:~/shell-bot#
With node 10 I get the following error log...