Failed at the bcrypt@0.8.7 install script 'node-gyp rebuild'

来源:互联网 发布:淘宝热搜关键词软件 编辑:程序博客网 时间:2024/06/03 21:36

nodejs在安装bcrypt@.0.8.7版本时报错Failed at the bcrypt@0.8.7 install script 'node-gyp rebuild'这个错误的意思是还需要安装node-gyp这个模块,但是我们在安装了node-gyp模块之后还是报错,报错的大概信息是python版本太低,那么在看看github上面关于这个模块的安装说明:https://github.com/nodejs/node-gyp#installation,看这个文档大概的意思就是:

bcrypt这个模块在linux上运行需要python(版本必须大于2.6)和gcc(版本必须大于4.8)的支持,所以请先升级这两个模块,升级需要大概半天的时间:

python升级:https://ruiaylin.github.io/2014/12/12/python%20update/

gcc升级:http://www.cnblogs.com/chihm/p/6007356.html


升级的时候注意一下几点:

服务器最好是root权限或者su切换到root权限。

升级完后重启服务器。

所有python和gcc升级完之后python -V和gcc -v来查看版本信息。

0 0
原创粉丝点击