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>



分享给朋友:
您可能感兴趣的文章:
随机阅读: