OraOpenSource / OXAR

Oracle XE & APEX build script along with images for popular cloud platforms
http://www.oraopensource.com/oxar/
MIT License
109 stars 42 forks source link

Npm is throwing errors on new install (CentosOS 7) #248

Open GasparYYC opened 6 years ago

GasparYYC commented 6 years ago

On a brand new installation (CentOS 7) on Vultr seems npm is just not happy.. I don't know if the mess they have with npm is affecting or OXAR Script needs to be revamped.. I know npm is a messy animal.. but maybe something can be done..

[root@portal oxar]# . build.sh

* Installing packages with yum *
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.fdcservers.net
 * epel: fedora-epel.mirror.lstn.net
 * extras: bay.uchicago.edu
 * updates: mirror.oss.ou.edu
No packages marked for update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.fdcservers.net
 * epel: fedora-epel.mirror.lstn.net
 * extras: bay.uchicago.edu
 * updates: mirror.oss.ou.edu
Package unzip-6.0-16.el7.x86_64 already installed and latest version
Package 1:java-1.8.0-openjdk-1.8.0.151-5.b12.el7_4.x86_64 already installed and latest version
Nothing to do

* Loading configurations *

######################################################################## 100.0%

* Running updates *

warning: /var/cache/yum/x86_64/7/nodesource/packages/nodejs-8.9.4-1nodesource.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 34fa74dd:                NOKEY
Importing GPG key 0x34FA74DD:
 Userid     : "NodeSource <gpg-rpm@nodesource.com>"
 Fingerprint: 2e55 207a 95d9 944b 0cc9 3261 5ddb e8d4 34fa 74dd
 Package    : nodesource-release-el7-1.noarch (installed)
 From       : /etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
Warning: RPMDB altered outside of yum.
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha1-QFUCsAfzGcP0cXXER0UnMA8qta0= i               ntegrity checksum failed when using sha1: wanted sha1-QFUCsAfzGcP0cXXER0UnMA8qta0= but got sha512-zr6QQnzLt3Ja0t0XI8gws2kn7zV2p0l/D3kreNvS6               hFZhVU5g+uY/30l42jbgt0XGcNBEmBDGJR71J692V92tA==. (260 bytes)
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules/pm2/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":               "linux","arch":"x64"})

Created symlink from /etc/systemd/system/multi-user.target.wants/pm2-root.service to /etc/systemd/system/pm2-root.service.
/usr/bin/which: no bower in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
npm WARN deprecated bower@1.8.2: ...psst! Your project can stop working at any moment because its dependencies can change. Prevent this by                migrating to Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/

* Installing ratom *

/usr/bin/which: no ratom in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
######################################################################## 100.0%

* Expanding Swap Space *

2099200+0 records in
2099200+0 records out
2149580800 bytes (2.1 GB) copied, 6.50535 s, 330 MB/s

* Installing Oracle XE *

######################################################################## 100.0%
/var/tmp/rpm-tmp.WCGarN: line 257: [: 18446744073692774399: integer expression expected
/var/tmp/rpm-tmp.WCGarN: line 271: [: 18446744073692774399: integer expression expected

* Oracle Config *

* Installing APEX *

######################################################################## 100.0%

* Configuring APEX *

* Installing node-oracledb *

oracledb ERR! Error: Cannot find odpi/include/dpi.h.  For GitHub ZIP downloads you must separately download the odpi subdirectory from GitHub.
oracledb ERR! Error: See https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#github

gyp: Call to 'INSTURL="https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#github"; ERR="oracledb ERR! Error:"; if [ -f odpi/include/d         pi.h ]; then echo "Has dpi.h"; else echo "$ERR Cannot find odpi/include/dpi.h.  For GitHub ZIP downloads you must separately download the odpi su         bdirectory from GitHub." >&2; echo "$ERR See $INSTURL" >&2; echo "" >&2; fi;' returned exit status 0 while in binding.gyp. while trying to load b         inding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 3.10.0-693.11.6.el7.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/oxar/node-oracledb
gyp ERR! node -v v8.9.4
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN rollback Rolling back nan@2.8.0 failed (this is probably harmless): /root/oxar/node-oracledb/node_modules/nan is not a child of /usr/lib
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! oracledb@2.0.15 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the oracledb@2.0.15 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-01-14T21_48_13_572Z-debug.log

* Installing Node4ORDS *

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN node4apex@0.0.1 No license field.

Generating a 2048 bit RSA private key
.......................+++
.........................................................................................+++
writing new private key to 'localhost.key'
-----

* Installing Tomcat *

Warning: RPMDB altered outside of yum.
Created symlink from /etc/systemd/system/multi-user.target.wants/tomcat@oxar.service to /usr/lib/systemd/system/tomcat@oxar.service.

* Configuring firewalld *

Looking at the file: /root/.npm/_logs/2018-01-14T21_48_13_572Z-debug.log

[root@server ~]# cat /root/.npm/_logs/2018-01-14T21_48_13_572Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/bin/npm', 'install', '-g', '--unsafe-perm' ]
2 info using npm@5.6.0
3 info using node@v8.9.4
4 verbose npm-session 1520f9613253f1f2
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly pacote directory manifest for undefined@file: fetched in 17ms
8 silly install loadIdealTree
9 silly install cloneCurrentTreeToIdealTree
10 silly install loadShrinkwrap
11 silly install loadAllDepsIntoIdealTree
12 silly resolveWithNewModule oracledb@2.0.15 checking installable status
13 http fetch GET 304 https://registry.npmjs.org/nan 86ms (from cache)
14 silly pacote range manifest for nan@~2.8.0 fetched in 124ms
15 silly resolveWithNewModule nan@2.8.0 checking installable status
16 silly currentTree lib
17 silly idealTree lib
17 silly idealTree └─┬ oracledb@2.0.15
17 silly idealTree   └── nan@2.8.0
18 silly install generateActionsToTake
19 silly diffTrees action count 2
20 silly diffTrees add nan@2.8.0
21 silly diffTrees add oracledb@2.0.15
22 silly decomposeActions action count 14
23 silly decomposeActions fetch nan@2.8.0
24 silly decomposeActions extract nan@2.8.0
25 silly decomposeActions preinstall nan@2.8.0
26 silly decomposeActions build nan@2.8.0
27 silly decomposeActions install nan@2.8.0
28 silly decomposeActions postinstall nan@2.8.0
29 silly decomposeActions finalize nan@2.8.0
30 silly decomposeActions refresh-package-json nan@2.8.0
31 silly decomposeActions preinstall oracledb@2.0.15
32 silly decomposeActions build oracledb@2.0.15
33 silly decomposeActions install oracledb@2.0.15
34 silly decomposeActions postinstall oracledb@2.0.15
35 silly decomposeActions finalize oracledb@2.0.15
36 silly decomposeActions refresh-package-json oracledb@2.0.15
37 silly install executeActions
38 silly doSerial global-install 14
39 verbose correctMkdir /root/.npm/_locks correctMkdir not in flight; initializing
40 verbose lock using /root/.npm/_locks/staging-a072192f34a17023.lock for /usr/lib/node_modules/.staging
41 silly doParallel extract 14
42 silly extract nan@2.8.0
43 silly pacote trying nan@https://registry.npmjs.org/nan/-/nan-2.8.0.tgz by hash: sha1-7XFfP+neArV6XmJS2QqWZ14fCFo=
44 silly pacote nan@https://registry.npmjs.org/nan/-/nan-2.8.0.tgz extracted to /usr/lib/node_modules/.staging/nan-e52c4313 by content address 49ms
45 silly doReverseSerial unbuild 14
46 silly doSerial remove 14
47 silly doSerial move 14
48 silly doSerial finalize 14
49 silly finalize /root/oxar/node-oracledb/node_modules/nan
50 silly finalize /root/oxar/node-oracledb
51 silly doParallel refresh-package-json 14
52 silly refresh-package-json /root/oxar/node-oracledb/node_modules/nan
53 silly refresh-package-json /root/oxar/node-oracledb
54 silly doParallel preinstall 14
55 silly preinstall nan@2.8.0
56 info lifecycle nan@2.8.0~preinstall: nan@2.8.0
57 silly preinstall oracledb@2.0.15
58 info lifecycle oracledb@2.0.15~preinstall: oracledb@2.0.15
59 silly doSerial build 14
60 silly build nan@2.8.0
61 info linkStuff nan@2.8.0
62 silly linkStuff nan@2.8.0 has /root/oxar/node-oracledb/node_modules as its parent node_modules
63 silly linkStuff nan@2.8.0 is part of a global install
64 silly linkStuff nan@2.8.0 is installed into a global node_modules
65 verbose linkBins nan@2.8.0
66 verbose linkMans nan@2.8.0
67 silly build oracledb@2.0.15
68 info linkStuff oracledb@2.0.15
69 silly linkStuff oracledb@2.0.15 has /usr/lib/node_modules as its parent node_modules
70 silly linkStuff oracledb@2.0.15 is part of a global install
71 silly linkStuff oracledb@2.0.15 is installed into a global node_modules
72 silly linkStuff oracledb@2.0.15 is installed into the top-level global node_modules
73 verbose linkBins oracledb@2.0.15
74 verbose linkMans oracledb@2.0.15
75 silly doSerial global-link 14
76 silly doParallel update-linked 14
77 silly doSerial install 14
78 silly install nan@2.8.0
79 info lifecycle nan@2.8.0~install: nan@2.8.0
80 silly install oracledb@2.0.15
81 info lifecycle oracledb@2.0.15~install: oracledb@2.0.15
82 verbose lifecycle oracledb@2.0.15~install: unsafe-perm in lifecycle true
83 verbose lifecycle oracledb@2.0.15~install: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/lib/node_modules/oracledb/node_modules/.bin:/usr/lib/node_modules/.bin:/u01/app/oracle/product/11.2.0/xe/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
84 verbose lifecycle oracledb@2.0.15~install: CWD: /usr/lib/node_modules/oracledb
85 silly lifecycle oracledb@2.0.15~install: Args: [ '-c', 'node-gyp rebuild' ]
86 silly lifecycle oracledb@2.0.15~install: Returned: code: 1  signal: null
87 info lifecycle oracledb@2.0.15~install: Failed to exec install script
88 verbose unlock done using /root/.npm/_locks/staging-a072192f34a17023.lock for /usr/lib/node_modules/.staging
89 warn rollback Rolling back nan@2.8.0 failed (this is probably harmless): /root/oxar/node-oracledb/node_modules/nan is not a child of /usr/lib
90 verbose stack Error: oracledb@2.0.15 install: `node-gyp rebuild`
90 verbose stack Exit status 1
90 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
90 verbose stack     at emitTwo (events.js:126:13)
90 verbose stack     at EventEmitter.emit (events.js:214:7)
90 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
90 verbose stack     at emitTwo (events.js:126:13)
90 verbose stack     at ChildProcess.emit (events.js:214:7)
90 verbose stack     at maybeClose (internal/child_process.js:925:16)
90 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
91 verbose pkgid oracledb@2.0.15
92 verbose cwd /root/oxar/node-oracledb
93 verbose Linux 3.10.0-693.11.6.el7.x86_64
94 verbose argv "/usr/bin/node" "/bin/npm" "install" "-g" "--unsafe-perm"
95 verbose node v8.9.4
96 verbose npm  v5.6.0
97 error code ELIFECYCLE
98 error errno 1
99 error oracledb@2.0.15 install: `node-gyp rebuild`
99 error Exit status 1
100 error Failed at the oracledb@2.0.15 install script.
100 error This is probably not a problem with npm. There is likely additional logging output above.
101 verbose exit [ 1, true ]
[root@server ~]#

I suspect this server will have issues updating npm down the road rendering the server useless Similar to See Issue #247

Look at the line right after Installing Ratom: npm WARN deprecated bower@1.8.2: ...psst! Your project can stop working at any moment because its dependencies can change. Prevent this by migrating to Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/ Seems to be a solution as per Issue https://github.com/npm/npm/issues/17146

MaikelAtWork commented 6 years ago

Hi, works if you edit the file scripts/node-oracledb.sh and append these 2 lines before the 'npm install -g --unsafe-perm' command: git submodule init git submodule update

This is explained in section 3.11.2 of https://github.com/oracle/node-oracledb/blob/master/INSTALL.md Regards Maikel