Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install the latest version (1.3.0) #251

Closed
sukhrobkhakimov opened this issue Oct 18, 2015 · 19 comments
Closed

Cannot install the latest version (1.3.0) #251

sukhrobkhakimov opened this issue Oct 18, 2015 · 19 comments

Comments

@sukhrobkhakimov
Copy link

screen shot 2015-10-18 at 16 51 39

@gintsgints
Copy link

This could be issue with your PC enviroment. What OS you have? Also try search google on this issue.

https://www.robertkehoe.com/2015/03/fix-node-gyp-rebuild-error-on-windows/

@sukhrobkhakimov
Copy link
Author

I tried Mac OS X and Ubuntu. Neither worked.
Thanks

@gintsgints
Copy link

In short, while installing oracledb package binary module for oracledb is needed to compile and C compiler fails to do that. Do you have development tools and oracle client libraries on that OS you try?

@gintsgints
Copy link

And check this for development tools you usualy need http://stackoverflow.com/questions/21365714/nodejs-error-installing-with-npm

@gintsgints
Copy link

One more thing to try. According to this - node-inspector/v8-debug#7

There is problem with grunt-node-inspector. Try install latest version of it by issuing:

npm install -g grunt-node-inspector

@sukhrobkhakimov
Copy link
Author

These are my steps:

  1. Install Ubuntu updates
    sudo apt-get update
  2. Install GCC and Make
    sudo apt-get install gcc make
  3. Install oracle basic and sdk
    https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instzip
  4. Tried both, neither helped
    npm install -g node-gyp
    npm install -g grunt-node-inspector
  5. Install oracledb fails
    npm install oracledb

I can install other packages though like "request", "redis", etc. My node version is 0.10.40. The requirement says that the package requires >0.10.28,<3.0.0.

Thanks

@gintsgints
Copy link

Check compile messages before ones you have posted.There should be some compile errors within driver binaries.

@cjbj
Copy link
Member

cjbj commented Oct 19, 2015

Do you need proxy set? On Ubuntu, did you install libaio1?

@sukhrobkhakimov
Copy link
Author

@cjbj Yes. I am behind proxy so I set proxy settings and installed libaio1. The docs mentions them https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instzip.

@cjbj
Copy link
Member

cjbj commented Oct 19, 2015

Some more detail about how you installed Instant Client and set the OCI_*_DIR variables might help us find a solution.

@sukhrobkhakimov
Copy link
Author

// Install oracle instant client
cd ~/Downloads
wget instantclient-basic-linux.x64-12.1.0.2.0.zip
wget instantclient-sdk-linux.x64-12.1.0.2.0.zip
cd /opt
sudo mkdir oracle
cd oracle
sudo cp ~/Downloads/instantclient-basic-linux.x64-12.1.0.2.0.zip ./
sudo cp ~/Downloads/instantclient-sdk-linux.x64-12.1.0.2.0.zip ./
unzip instantclient-basic-linux.x64-12.1.0.2.0.zip
unzip instantclient-sdk-linux.x64-12.1.0.2.0.zip
sudo mv instantclient_12_1 instantclient
cd instantclient
sudo ln -s libclntsh.so.12.1 libclntsh.so
sudo vim /etc/ld.so.conf.d/oracle-instantclient.conf
export LD_LIBRARY_PATH=/opt/oracle/instantclient:$LD_LIBRARY_PATH
sudo /sbin/ldconfig -v
export OCI_LIB_DIR=/opt/oracle/instantclient
export OCI_INC_DIR=/opt/oracle/instantclient/sdk/include

// Install nvm
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
nvm install 0.10.40
npm config set proxy http://proxy_server_ip/
npm config set https-proxy http://proxy_server_ip/
npm install oracledb

@sukhrobkhakimov
Copy link
Author

nodejs/node-gyp#777

@cjbj
Copy link
Member

cjbj commented Oct 19, 2015

What exactly did you do with ld.so.conf - and why did you also set LD_LIBRARY_PATH? Normally you would do one or the other.

Does the verbose 'npm install' log show anything? Are there directory permission problems?
Did you also try setting the shell environment variables http_proxy and https_proxy. I could swear I've seen funky things with npm vs shell proxy settings. Have you run 'npm cache clean'?

@sukhrobkhakimov
Copy link
Author

I permanently added to LD_LIBRARY_PATH to "/etc/ld.so.conf.d/oracle-instantclient.conf" as I don't have other oracle installations. The documentation says:

"To run applications, you will need to set the link path:

export LD_LIBRARY_PATH=/opt/oracle/instantclient:$LD_LIBRARY_PATH

Alternatively, if there is no other Oracle software on the machine that will be impacted, permanently add Instant Client to the run-time link path. Do this on Linux by creating a file /etc/ld.so.conf.d/oracle-instantclient.conf that contains the library location /opt/oracle/instantclient, and then run ldconfig as the root user."

So, I did:
sudo vim /etc/ld.so.conf.d/oracle-instantclient.conf
export LD_LIBRARY_PATH=/opt/oracle/instantclient:$LD_LIBRARY_PATH
:qw
sudo /sbin/ldconfig (/sbin/ldconfig.real: /opt/oracle/instantclient:$LD_LIBRARY_PATH is not a known library type)

My proxy settings are fine because I can install any other software or tools or node js packages from the server. I configured /etc/environment and /etc/apt/apt.conf.d/95proxies properly.

npm install oracledb --verbose
dev@Dev:~$ npm install oracledb --verbose
npm info it worked if it ends with ok
npm verb cli [ '/home/dev/.nvm/versions/node/v0.12.7/bin/node',
npm verb cli '/home/dev/.nvm/versions/node/v0.12.7/bin/npm',
npm verb cli 'install',
npm verb cli 'oracledb',
npm verb cli '--verbose' ]
npm info using npm@2.11.3
npm info using node@v0.12.7
npm verb config Skipping project config: /home/dev/.npmrc. (matches userconfig)
npm verb install initial load of /home/dev/package.json
npm verb readDependencies loading dependencies from /home/dev/package.json
npm verb cache add spec oracledb
npm verb addNamed "*" is a valid semver range for oracledb
npm verb addNameRange registry:https://registry.npmjs.org/oracledb not in flight; fetching
npm verb request uri https://registry.npmjs.org/oracledb
npm verb request no auth needed
npm info attempt registry request try #1 at 10:06:38 AM
npm verb request id 4cbe1dff3d96ff00
npm verb etag "AEPS7VDRLDI850NUYPO5FW6VQ"
npm http request GET https://registry.npmjs.org/oracledb
npm http 304 https://registry.npmjs.org/oracledb
npm verb etag https://registry.npmjs.org/oracledb from cache
npm verb get saving oracledb to /home/dev/.npm/registry.npmjs.org/oracledb/.cache.json
npm verb addNamed "1.3.0" is a plain semver version for oracledb
npm verb afterAdd /home/dev/.npm/oracledb/1.3.0/package/package.json not in flight; writing
npm verb afterAdd /home/dev/.npm/oracledb/1.3.0/package/package.json written
npm info install oracledb@1.3.0 into /home/dev
npm info installOne oracledb@1.3.0
npm verb installOne of oracledb to /home/dev not in flight; installing
npm verb lock using /home/dev/.npm/_locks/oracledb-b3277ebb930fb055.lock for /home/dev/node_modules/oracledb
npm verb unbuild node_modules/oracledb
npm verb gentlyRm don't care about contents; nuking /home/dev/node_modules/oracledb
npm verb tar unpack /home/dev/.npm/oracledb/1.3.0/package.tgz
npm verb tar unpacking to /home/dev/node_modules/oracledb
npm verb gentlyRm don't care about contents; nuking /home/dev/node_modules/oracledb
npm verb write writing to /home/dev/node_modules/oracledb/package.json
npm info preinstall oracledb@1.3.0
npm verb readDependencies loading dependencies from /home/dev/node_modules/oracledb/package.json
npm verb readDependencies loading dependencies from /home/dev/node_modules/oracledb/package.json
npm verb cache add spec nan@^1.8.4
npm verb addNamed ">=1.8.4 <2.0.0" is a valid semver range for nan
npm verb addNameRange registry:https://registry.npmjs.org/nan not in flight; fetching
npm verb request uri https://registry.npmjs.org/nan
npm verb request no auth needed
npm info attempt registry request try #1 at 10:06:40 AM
npm verb etag "EEJEYBDBWDA07LWTXUI68JUWL"
npm http request GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
npm verb etag https://registry.npmjs.org/nan from cache
npm verb get saving nan to /home/dev/.npm/registry.npmjs.org/nan/.cache.json
npm verb addNamed "1.9.0" is a plain semver version for nan
npm verb afterAdd /home/dev/.npm/nan/1.9.0/package/package.json not in flight; writing
npm verb afterAdd /home/dev/.npm/nan/1.9.0/package/package.json written
npm info install nan@1.9.0 into /home/dev/node_modules/oracledb
npm info installOne nan@1.9.0
npm verb installOne of nan to /home/dev/node_modules/oracledb not in flight; installing
npm verb lock using /home/dev/.npm/_locks/nan-b724e97ea9c34487.lock for /home/dev/node_modules/oracledb/node_modules/nan
npm verb unbuild node_modules/oracledb/node_modules/nan
npm verb gentlyRm don't care about contents; nuking /home/dev/node_modules/oracledb/node_modules/nan
npm verb tar unpack /home/dev/.npm/nan/1.9.0/package.tgz
npm verb tar unpacking to /home/dev/node_modules/oracledb/node_modules/nan
npm verb gentlyRm don't care about contents; nuking /home/dev/node_modules/oracledb/node_modules/nan
npm verb write writing to /home/dev/node_modules/oracledb/node_modules/nan/package.json
npm info preinstall nan@1.9.0
npm verb readDependencies loading dependencies from /home/dev/node_modules/oracledb/node_modules/nan/package.json
npm verb readDependencies loading dependencies from /home/dev/node_modules/oracledb/node_modules/nan/package.json
npm verb about to build /home/dev/node_modules/oracledb/node_modules/nan
npm info build /home/dev/node_modules/oracledb/node_modules/nan
npm info linkStuff nan@1.9.0
npm verb linkBins nan@1.9.0
npm verb linkMans nan@1.9.0
npm verb rebuildBundles nan@1.9.0
npm info install nan@1.9.0
npm info postinstall nan@1.9.0
npm verb unlock done using /home/dev/.npm/_locks/nan-b724e97ea9c34487.lock for /home/dev/node_modules/oracledb/node_modules/nan
npm verb about to build /home/dev/node_modules/oracledb
npm info build /home/dev/node_modules/oracledb
npm info linkStuff oracledb@1.3.0
npm verb linkBins oracledb@1.3.0
npm verb linkMans oracledb@1.3.0
npm verb rebuildBundles oracledb@1.3.0
npm verb rebuildBundles [ 'nan' ]
npm info install oracledb@1.3.0

oracledb@1.3.0 install /home/dev/node_modules/oracledb
node-gyp rebuild

gyp info it worked if it ends with ok
gyp verb cli [ 'node',
gyp verb cli '/home/dev/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild' ]
gyp info using node-gyp@2.0.1
gyp info using node@0.12.7 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which succeeded python2 /usr/bin/python2
gyp verb check python version python2 -c "import platform; print(platform.python_version());" returned: "2.7.6\n"
gyp verb get node dir no --target version specified, falling back to host node version: v0.12.7
gyp verb command install [ 'v0.12.7' ]
gyp verb install input version string "v0.12.7"
gyp verb install installing version: 0.12.7
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 0
gyp verb needs "installVersion" 9
gyp verb install version is no good; reinstalling
gyp verb ensuring nodedir is created /home/dev/.node-gyp/0.12.7
gyp http GET http://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz
gyp verb download using proxy url: "http://10.10.0.96:3128/"
gyp http 200 http://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz
gyp verb extracted file from tarball deps/http_parser/http_parser.h
gyp verb extracted file from tarball deps/mdb_v8/v8cfg.h
gyp verb extracted file from tarball deps/mdb_v8/v8dbg.h
gyp verb extracted file from tarball deps/debugger-agent/include/debugger-agent.h
gyp verb extracted file from tarball deps/debugger-agent/src/agent.h
gyp verb extracted file from tarball deps/v8/third_party/fdlibm/fdlibm.h
gyp verb extracted file from tarball deps/v8/tools/shell-utils.h
gyp verb extracted file from tarball deps/v8/include/libplatform/libplatform.h
gyp verb extracted file from tarball deps/v8/include/v8-platform.h
gyp verb extracted file from tarball deps/v8/include/v8-testing.h
gyp verb extracted file from tarball deps/v8/include/v8-util.h
gyp verb extracted file from tarball deps/v8/include/v8-debug.h
gyp verb extracted file from tarball deps/v8/include/v8stdint.h
gyp verb extracted file from tarball deps/v8/include/v8.h
gyp verb content checksum node-v0.12.7.tar.gz 17f8080d747b597fb8c819517bb153a313f3369d3d12c586d7efab4e4535df48
gyp ERR! Completion callback never invoked!
gyp ERR! System Linux 3.16.0-30-generic
gyp ERR! command "node" "/home/dev/.nvm/versions/node/v0.12.7/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/dev/node_modules/oracledb
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! This is a bug in node-gyp.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR! https://github.com/TooTallNate/node-gyp/issues
npm verb unsafe-perm in lifecycle true
npm info oracledb@1.3.0 Failed to exec install script
npm verb unlock done using /home/dev/.npm/_locks/oracledb-b3277ebb930fb055.lock for /home/dev/node_modules/oracledb
npm verb stack Error: oracledb@1.3.0 install: node-gyp rebuild
npm verb stack Exit status 6
npm verb stack at EventEmitter. (/home/dev/.nvm/versions/node/v0.12.7/lib/node_modules/npm/lib/utils/lifecycle.js:213:16)
npm verb stack at EventEmitter.emit (events.js:110:17)
npm verb stack at ChildProcess. (/home/dev/.nvm/versions/node/v0.12.7/lib/node_modules/npm/lib/utils/spawn.js:24:14)
npm verb stack at ChildProcess.emit (events.js:110:17)
npm verb stack at maybeClose (child_process.js:1015:16)
npm verb stack at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
npm verb pkgid oracledb@1.3.0
npm verb cwd /home/dev
npm ERR! Linux 3.16.0-30-generic
npm ERR! argv "/home/dev/.nvm/versions/node/v0.12.7/bin/node" "/home/dev/.nvm/versions/node/v0.12.7/bin/npm" "install" "oracledb" "--verbose"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE

npm ERR! oracledb@1.3.0 install: node-gyp rebuild
npm ERR! Exit status 6
npm ERR!
npm ERR! Failed at the oracledb@1.3.0 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the oracledb package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls oracledb
npm ERR! There is likely additional logging output above.
npm verb exit [ 1, true ]
npm verb unbuild node_modules/oracledb
npm info preuninstall oracledb@1.3.0
npm info uninstall oracledb@1.3.0
npm verb unbuild rmStuff oracledb@1.3.0 from /home/dev/node_modules
npm info postuninstall oracledb@1.3.0
npm verb gentlyRm don't care about contents; nuking /home/dev/node_modules/oracledb

npm ERR! Please include the following file with any support request:
npm ERR! /home/dev/npm-debug.log

@sukhrobkhakimov
Copy link
Author

I don't understand why it is so difficult to install oracledb package compared to mysql, redis, etc.

@cjbj
Copy link
Member

cjbj commented Oct 20, 2015

The /etc/ld.so.conf.d/oracle-instantclient.conf entry should be just the path name:

/opt/oracle/instantclient

It is not a shell script, so it won't understand export. Check the ldconfig man page.

@Bigous
Copy link
Contributor

Bigous commented Oct 22, 2015

@Sukhrob your error list is showing that you are using an old version of node-gyp (node-gyp@2.0.1). Could you try to upgrade and see if it works?
For reference, I'm using version 3.0.3.

@sukhrobkhakimov
Copy link
Author

I ended up using java as a bridge to connect to the remote oracle database as it is not working for my colleagues either. Anyway, thanks @cjbj, @Bigous, @gintsgints for your support. I wish I could find the problem if it exists and save time for others who may also have this problem. But, I haven't got enough time right now and need a solution immediately. But, I will come back to deal with this problem later so that others can benefit.

@cjbj
Copy link
Member

cjbj commented Oct 22, 2015

@Sukhrob thanks for letting us know the outcome.

@cjbj cjbj closed this as completed Oct 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants