首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >npm-安装bignum失败

npm-安装bignum失败
EN

Stack Overflow用户
提问于 2014-10-14 21:30:24
回答 1查看 4.2K关注 0票数 3

尝试使用NPM安装bignum Node.js包,但我没有太多的运气。我正在使用Windows7,并以管理员身份运行命令行。我使用Python3.4和c:\Python34将NPM更新到最新版本(我也尝试了Python2.6,结果类似)。我还尝试了本文中提到的解决方法:npm install returning error。甚至尝试过旧版本的bignum (0.8.0)。尽管如此,每次我尝试安装时,都会看到以下内容:

代码语言:javascript
复制
> bignum@0.9.0 install C:\Program Files\nodejs\node_modules\bignum
> node-gyp configure build

C:\Program Files\nodejs\node_modules\bignum>node "C:\Program Files\nodejs\node_m
odules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" config
ure build
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack     at errnoException (child_process.js:980:11)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:771:
34)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modu
les\\node-gyp\\bin\\node-gyp.js" "configure" "build"
gyp ERR! cwd C:\Program Files\nodejs\node_modules\bignum
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs
\\node_modules\\npm\\bin\\npm-cli.js" "install" "bignum"
npm ERR! node v0.10.24
npm ERR! npm  v2.1.2
npm ERR! code ELIFECYCLE

npm ERR! bignum@0.9.0 install: `node-gyp configure build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bignum@0.9.0 install script.
npm ERR! This is most likely a problem with the bignum package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls bignum
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Program Files\nodejs\npm-debug.log

有没有什么是我没有做的或者做错了什么,或者是包有问题?

致以亲切的问候,

瑞安

EN

回答 1

Stack Overflow用户

发布于 2015-08-18 18:57:36

我在尝试下载socket.io时遇到了类似的问题(错误:生成C:\Python34ENOENT)

代码语言:javascript
复制
npm install -g socket.io

我添加了一个指向Python可执行文件的环境变量

代码语言:javascript
复制
set PYTHONPATH=C:\Python34
set PYTHON=%PYTHONPATH%\python.exe

这导致了错误消息" error : Python可执行文件"C:\Python34\python.exe“is v3.4.3,gyp不支持”。

然后,我下载了较旧版本的Python - 2.7.10 -并将环境变量更改为指向此较旧版本

代码语言:javascript
复制
set PYTHONPATH=C:\Python27
set PYTHON=%PYTHONPATH%\python.exe

这解决了我的问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26362122

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档