nodejs sqlite3 bad interpreter

Marvell Kirkwood based
Post Reply
adrhc
Posts: 291
Joined: Sun Jul 14, 2013 1:42 pm
Contact:

nodejs sqlite3 bad interpreter

Post by adrhc » Fri Oct 17, 2014 6:21 am

I installed memiks:node-0.10.24-oarm-2.txz in order to install then http://support.ghost.org/installing-ghost-linux/. I get this error:

Code: Select all

npm WARN engine html-to-text@0.1.0: wanted: {"node":"~0.8.0"} (current: {"node":"0.10.30","npm":"1.4.21"})
npm WARN deprecated set-immediate@0.1.1: Use `setimmediate` instead
/
> sqlite3@2.2.7 install /usr/local/zy-pkgs/ffproot/ffp/opt/ghost/node_modules/sqlite3
> node-pre-gyp install --fallback-to-build

sh: /usr/local/zy-pkgs/ffproot/ffp/opt/ghost/node_modules/sqlite3/node_modules/.bin/node-pre-gyp: /usr/bin/env: bad interpreter: No such file or directory
npm ERR! sqlite3@2.2.7 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the sqlite3@2.2.7 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-pre-gyp install --fallback-to-build
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.31.8
npm ERR! command "/ffp/opt/nodejs/bin/node" "/ffp/opt/nodejs/bin/npm" "install" "--production"
npm ERR! cwd /usr/local/zy-pkgs/ffproot/ffp/opt/ghost
npm ERR! node -v v0.10.30
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /usr/local/zy-pkgs/ffproot/ffp/opt/ghost/npm-debug.log
npm ERR! not ok code 0
I even compiled by myself nodejs changing any /bin or /usr/bin to /ffp/bin; same change I done to ghost before installing it and still having the same problem.
How would you solve this ?

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: nodejs sqlite3 bad interpreter

Post by barmalej2 » Fri Oct 17, 2014 6:59 am

You have installed wrong arm version of node- it is oabi arm package. Install arm (eabi) version instead-memiks:node-0.8.21-arm-2.txz or memiks:node-0.8.21-arm-1.txz
And of course change /usr/bin/env to /ffp/bin/env in node-pre-gyp.

adrhc
Posts: 291
Joined: Sun Jul 14, 2013 1:42 pm
Contact:

Re: nodejs sqlite3 bad interpreter

Post by adrhc » Fri Oct 17, 2014 11:24 am

How can you tell it's oabi but not eabi ?

I already tried to modify node-pre-gyp but it doesn't exists.

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: nodejs sqlite3 bad interpreter

Post by barmalej2 » Fri Oct 17, 2014 12:47 pm

Standard practic for ffp-oarm package creating was and is packagename-version-oarm-buildnumber.txz
makepkg builds and names oarm package, if source is configured for arm-*-uclibc instead arm-*-uclibcgnueabi (eabi)

adrhc
Posts: 291
Joined: Sun Jul 14, 2013 1:42 pm
Contact:

Re: nodejs sqlite3 bad interpreter

Post by adrhc » Fri Oct 17, 2014 2:00 pm

Anyway it happens the same for my compiled version of nodejs and I'm sure I compiled it correctly. It seems a sqlite3 issue.

adrhc
Posts: 291
Joined: Sun Jul 14, 2013 1:42 pm
Contact:

Re: nodejs sqlite3 bad interpreter

Post by adrhc » Fri Oct 17, 2014 2:27 pm

Indeed it's sqlite3 problem.
SOLUTION:
cd ~/temp
wget http://registry.npmjs.org/sqlite3/-/sqlite3-2.2.7.tgz
mkdir sqlite3-2.2.7
cd sqlite3-2.2.7
cp ../sqlite3-2.2.7.tgz .
tar xvzf ./sqlite3-2.2.7.tgz
rm sqlite3-2.2.7.tgz
find . -type f -exec sed -i s/"\/usr\/bin\/bash"/"\/ffp\/bin\/bash"/ {} \;
find . -type f -exec sed -i s/"\/usr\/bin\/sh"/"\/ffp\/bin\/sh"/ {} \;
find . -type f -exec sed -i s/"\/usr\/bin\/env"/"\/ffp\/bin\/env"/ {} \;
find . -type f -exec sed -i s/"\/bin\/bash"/"\/ffp\/bin\/bash"/ {} \;
find . -type f -exec sed -i s/"\/bin\/sh"/"\/ffp\/bin\/sh"/ {} \;
find . -type f -exec sed -i s/"\/bin\/env"/"\/ffp\/bin\/env"/ {} \;
find . -type f -exec sed -i s/"\/ffp\/ffp\/"/"\/ffp\/"/ {} \;
tar czf sqlite3-2.2.7.tgz package
npm install sqlite3-2.2.7.tgz

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: nodejs sqlite3 bad interpreter

Post by barmalej2 » Fri Oct 17, 2014 3:59 pm

adrhc wrote:I even compiled by myself nodejs.
I am a bit curious. Is it working as intended? As far as I understand, during compilation process of nodejs, it gets and builds google V8, which is dependency for nodejs.
This is quote from one of V8 developers:
V8 minimum requirements are now ARMv6 + VFPv2 and your platform is ARMv5 without VFP, so it is not supported
Older versions of V8 supported armv5.
https://code.google.com/p/v8/issues/det ... ea%20Stars

adrhc
Posts: 291
Joined: Sun Jul 14, 2013 1:42 pm
Contact:

Re: nodejs sqlite3 bad interpreter

Post by adrhc » Fri Oct 17, 2014 6:06 pm

Hm, strange but it's working for me (armv5te). I'm running ghost on nodejs.
You have everything here:
http://adrhc.go.ro/wordpress/install-configure-ghost/

PS: try http://adrhc.asuscomm.com/wordpress/ins ... ure-ghost/ if not working the above

greenwitch
Posts: 24
Joined: Sun Feb 26, 2017 10:09 pm

Re: nodejs sqlite3 bad interpreter

Post by greenwitch » Sun Jan 21, 2018 1:53 pm

Hello,

I am trying to reach memiks repository to download node package for arm, but it is not working any more.
Does anybody have backup of node package for arm processor?

Adam

Post Reply