WebFaction
Community site: login faq

Hi, I am trying to install sqlite3 node module and running into some issues.

$ npm install sqlite3 returns:

gyp ERR! configure error 
gyp ERR! stack Error: Python executable "python" is v2.4.3, which is not supported by gyp.
gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0.

so then I tried: $ PYTHON=python2.6 npm install sqlite3:

> sqlite3@2.1.5 install /home/dtrack/webapps/mobilegeo/node_modules/sqlite3
> node-gyp rebuild

make: Entering directory `/home/dtrack/webapps/mobilegeo/node_modules/sqlite3/build'
  CC(target) Release/obj.target/sqlite3/deps/sqlite3/sqlite3.o
../deps/sqlite3/sqlite3.c: In function ‘porter_stemmer’:
../deps/sqlite3/sqlite3.c:121290: warning: value computed is not used
../deps/sqlite3/sqlite3.c:121294: warning: value computed is not used
../deps/sqlite3/sqlite3.c:121307: warning: value computed is not used
../deps/sqlite3/sqlite3.c:121312: warning: value computed is not used
../deps/sqlite3/sqlite3.c:121318: warning: value computed is not used
../deps/sqlite3/sqlite3.c:121323: warning: value computed is not used
../deps/sqlite3/sqlite3.c:121332: warning: value computed is not used
../deps/sqlite3/sqlite3.c:121339: warning: value computed is not used
../deps/sqlite3/sqlite3.c:121382: warning: value computed is not used
../deps/sqlite3/sqlite3.c:121402: warning: value computed is not used
  AR(target) Release/obj.target/deps/sqlite3/sqlite3.a
ar: illegal option -- T
Usage: ar [emulation options] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...
       ar -M [<mri-script]
 commands:
  d            - delete file(s) from the archive
  m[ab]        - move file(s) in the archive
  p            - print file(s) found in the archive
  q[f]         - quick append file(s) to the archive
  r[ab][f][u]  - replace existing or insert new file(s) into the archive
  t            - display contents of archive
  x[o]         - extract file(s) from the archive
 command specific modifiers:
  [a]          - put file(s) after [member-name]
  [b]          - put file(s) before [member-name] (same as [i])
  [N]          - use instance [count] of name
  [f]          - truncate inserted file names
  [P]          - use full path names when matching
  [o]          - preserve original dates
  [u]          - only replace files that are newer than current archive contents
 generic modifiers:
  [c]          - do not warn if the library had to be created
  [s]          - create an archive index (cf. ranlib)
  [S]          - do not build a symbol table
  [v]          - be verbose
  [V]          - display the version number
  @<file>      - read options from <file>
 emulation options: 
  No emulation specific options
ar: supported targets: elf32-i386 a.out-i386-linux efi-app-ia32 elf64-x86-64 elf64-little elf64-big elf32-little elf32-big srec symbolsrec tekhex binary ihex trad-core
make: *** [Release/obj.target/deps/sqlite3/sqlite3.a] Error 1
make: Leaving directory `/home/dtrack/webapps/mobilegeo/node_modules/sqlite3/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/home/dtrack/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:255:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Linux 2.6.18-308.24.1.el5PAE
gyp ERR! command "node" "/home/dtrack/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/dtrack/webapps/mobilegeo/node_modules/sqlite3
gyp ERR! node -v v0.8.18
gyp ERR! node-gyp -v v0.8.4
gyp ERR! not ok 
npm ERR! sqlite3@2.1.5 install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR! 
npm ERR! Failed at the sqlite3@2.1.5 install script.
npm ERR! This is most likely a problem with the sqlite3 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 sqlite3
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 2.6.18-308.24.1.el5PAE
npm ERR! command "node" "/home/dtrack/bin/npm" "install" "sqlite3"
npm ERR! cwd /home/dtrack/webapps/mobilegeo
npm ERR! node -v v0.8.18
npm ERR! npm -v 1.2.7
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/dtrack/webapps/mobilegeo/npm-debug.log
npm ERR! not ok code 0

Trying with python 2.7 yields the same error. Any one has any idea? Thanks alot !

asked 06 Feb '13, 14:13

dtrack
1612
accept rate: 50%


Thanks johns, ar is part of binutils which had an old version on the centos. I ended up installing a newer version of gcc (4.6) which was probably overkill but everything now works.

I followed these instructions for gcc: http://community.webfaction.com/questions/6921/compiling-gcc-46

permanent link

answered 06 Feb '13, 22:03

dtrack
1612
accept rate: 50%

edited 06 Feb '13, 22:03

The part which stands out to me is this,

    AR(target) Release/obj.target/deps/sqlite3/sqlite3.a
ar: illegal option -- T

That is where the script appears to fail first and give the most verbosity about why, the other failures under it are likely related to this first one. You should contact the package maintainers for more information about the failure and what it might mean.

permanent link

answered 06 Feb '13, 17:51

johns
5.4k412
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×15
×11
×9

question asked: 06 Feb '13, 14:13

question was seen: 6,019 times

last updated: 06 Feb '13, 22:03

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM