CentOS 6.5下安装node.js mongodb(express driver)

<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">折腾了两天,终于成功安装了npm install mongodb...</span>

下面是成功安装的流程:

安装nodejs:

参考node.js官网:

1,下载

curl --silent --location https://rpm.nodesource.com/setup | bash -

2,安装

yum -y install nodejs

<span style="background-color: rgb(240, 240, 240);">3,安装依赖环境包
</span><pre name="code" class="html" style="font-family: monospace; background-color: rgb(240, 240, 240);">yum groupinstall 'Development Tools'
<h1>安装mongodb:</h1>
npm install mongodb

编译问题:遇到缺少 ssapi/sspapi.h
解决方案:安装<span style="font-family: Consolas, 'Courier New', Courier, mono, serif; line-height: 13.199999809265137px; background-color: rgb(245, 245, 245);">openssl-devel  </span>
<span style="font-family: Consolas, 'Courier New', Courier, mono, serif; line-height: 13.199999809265137px; background-color: rgb(245, 245, 245);"><span style="white-space:pre">	</span>yum install openssl-devel</span>
<span style="font-family: Consolas, 'Courier New', Courier, mono, serif; line-height: 13.199999809265137px; background-color: rgb(245, 245, 245);">其他可能缺少的库:</span>
<span style="font-family: Consolas, 'Courier New', Courier, mono, serif; line-height: 13.199999809265137px; background-color: rgb(245, 245, 245);"><span style="font-family: Consolas, 'Courier New', Courier, mono, serif; line-height: 13.199999809265137px; background-color: rgb(245, 245, 245);"><span style="white-space:pre">	</span>yum install libtool automake autoconf gcc-c++</span>
</span>


<span style="font-family:Consolas, Courier New, Courier, mono, serif;"><span style="line-height: 13.199999809265137px; background-color: rgb(245, 245, 245);">最后安装完成。若遇到问题,可以尝试</span></span>
<span style="font-family:Consolas, Courier New, Courier, mono, serif;"><span style="line-height: 13.199999809265137px; background-color: rgb(245, 245, 245);"><span style="white-space:pre">	</span>npm cache clean</span></span>

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值