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

Failed to build node-sqlite3 on Windows 7 #106

Closed
anta40 opened this issue Dec 6, 2012 · 13 comments
Closed

Failed to build node-sqlite3 on Windows 7 #106

anta40 opened this issue Dec 6, 2012 · 13 comments

Comments

@anta40
Copy link

anta40 commented Dec 6, 2012

I tried these 3 ways to install node-sqlite3 on 32-bit Windows 7 (VS 2012, Python 2.7.2):
npm install sqlite3 --msvs_version=2012
npm install sqlite3 --msvs_version=v110
npm install sqlite3 --msvs_version=auto

None of them succed. Here's the build log:
http://pastebin.com/9LuPJL9f

Is there any 'easy' treatment for this problem?
I assume building this on Linux is straightforward, and I'm fine with it, but unfortunately my work PC is running Windows :|

@remitoffoli
Copy link

Same problem for me, i can't install node-sqlite3 with npm nor build it with git on win7. What can i do ?

@velulev
Copy link

velulev commented Feb 15, 2013

Friends, you need to install Python 2.6 to 2.7.3 version for node-gyp to work. Hope you have done this first. Do not install versions later than 2.7.3. Follow python installation steps as mentioned in the URL http://dailyjs.com/2012/05/17/windows-and-node-3/

@ErisDS
Copy link
Member

ErisDS commented Mar 30, 2013

I have installed .NET Framework 2.0 SDK, VS Express 2010 and python 2.7.3 and am having the same / very similar problem. I have followed every set of instructions I could find around the web to no avail.
I have tried with the --arch=ia32 flag and without. I have also tried the 3 msvs_version flags listed above

Ultimately, every time it fails with the error:

251 error [email protected] install: node-gyp rebuild
251 error cmd "/c" "node-gyp rebuild" failed with 1
252 error Failed at the [email protected] install script.
252 error This is most likely a problem with the sqlite3 package,
252 error not with npm itself.

Here's my npm_debug.log > http://pastebin.com/ASdd6YXH

I would really appreciate any advice :)

@ErisDS
Copy link
Member

ErisDS commented Mar 30, 2013

I finally got this working (I think).
I tried with these instructions: https://github.com/developmentseed/node-sqlite3/wiki/Building-On-Windows but they seem to be out of date.
The up to date version seems to basically require the prerequisites here: https://github.com/TooTallNate/node-gyp

I am on 64bit, so I required the 64bit SDK: http://www.microsoft.com/en-us/download/details.aspx?displayLang=en&id=8279 (I had to uninstall existing executables first as per the instructions)
I also needed VS, I installed VS Express 2010 http://go.microsoft.com/?linkid=9816758

Then in my start menu, I ran the CMD prompt in the VS directory which is 64 bit and sets up the correct environment, although not sure that was necessary, running npm install sqlite3 then worked.

I do hope the binaries get added sometime soon, it is far too much work / hassle to do all this for users of a package which relies on sqlite3 which is real shame.

@springmeyer
Copy link
Contributor

@ErisDS - great job making progress, and sorry it is such an effort. Also I cannot see your paste - something must of went wrong with the link (maybe use gist.github.com ?). Also be aware that only the most recent tag supports node v0.10.0. You might have better luck using node v0.8.x if you hit any other issues.

@ErisDS
Copy link
Member

ErisDS commented Mar 30, 2013

I was using node v0.8.x and upgraded today as one of my many, many attempts to fix this problem :) Ultimately it worked on v0.10.0 as I did not downgrade. Not sure what happened to my pastebin, but nevermind - I essentially had every error under the sun to do with not being able to run node-gyp rebuild, because my environment didn't have the necessary tools for building x64.

Spending hours fixing something like this is always a great learning experience, my only bug bear is I still don't know enough to fix the problem for everyone else :( I can zip up the built version though and provide it if that would be of any help.

@springmeyer
Copy link
Contributor

gocha, thanks for the extra details. zipping up, posting, and linking here sounds good if you have the energy left. When I get time to do a build for others I can compare to what you came up with. thanks for communicating your experience.

@ErisDS
Copy link
Member

ErisDS commented Mar 30, 2013

Here's a zip of my node_modules/sqlite3 folder, on two different upload services just in case:

Win7 64bit:
http://www.speedyshare.com/6kyrn/sqlite3.zip
http://www43.zippyshare.com/v/51087458/file.html
md5sum: 70b22c23c21111ee6ef657bb9d496171

Ubuntu i686 (this built with no issues but as I have it I figured I'd add it here):
http://www.speedyshare.com/CGgAj/sqlite3.zip
http://www50.zippyshare.com/v/52994612/file.html
md5sum: daff247887ae5b9e6ba72b7639350f83

Mac i386 OS 10.7.5 (requires xcode or similar to build)
http://www.speedyshare.com/ZFkAc/sqlite3.zip
http://www37.zippyshare.com/v/73928935/file.html
md5sum: c2ed5f8c486e2260610a50aaa902a6eb

That's all the OS/arch's I have available for now! Hope it helps a bit with #67 :)

@zcmarkyoung
Copy link

could you give some advice of my issue #134

@springmeyer
Copy link
Contributor

sorry it took so long, but finally updated the build instructions at https://github.com/developmentseed/node-sqlite3/wiki/Building-on-Windows. Anyone that hits problems please create a new issue and I will try to help. Thanks again to @ErisDS for helping troubleshoot above.

@speedneeder
Copy link

@ErisDS
Hi, I have the same problem like you, and I try all the way to solve it but it still exist.I try to download the folder you had upload, but the two link are both invalid.

Would you please upload it again? My system is Win7. Thank you very much!

@ErisDS
Copy link
Member

ErisDS commented Jan 20, 2015

@speedneeder this issue is well over a year old, node-sqlite3 has changed considerably in that time - you'll likely need a different solution.

@speedneeder
Copy link

@ErisDS
I am a beginner of programming, so there are many things I dont know, thanks for your reply! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants