zoukankan      html  css  js  c++  java
  • 在linux环境下配置node:node + npm + forever

    我的技术博客经常被流氓网站恶意爬取转载。请移步原文:http://www.cnblogs.com/hamhog/p/3574582.html,享受整齐的排版、有效的链接、正确的代码缩进、更好的阅读体验。

    经历很多遍了,也遇到过各种各样的错误;在此记录一下过程,以备将来参考。

    1. 安装node

    apt-get install nodejs

    2. 安装npm

    apt-get update
    apt-get install npm

    3. 安装forever

    此时安装forever失败。提示:

    npm ERR! Error: failed to fetch from registry:

    执行:

    npm config set registry http://registry.npmjs.org

    安装forever仍然失败。提示:

    /usr/local/lib/node_modules/forever/node_modules/microtime/wscript:9: error: could not configure a cxx compiler!

    于是安装g++:

    apt-get install g++

    最后安装forever:

    npm install forever -g

    4. 启动node

    进入node所在目录,然后执行(以server.js为例):

    forever start server.js
  • 相关阅读:
    记录按钮点击次数,点击三次之后跳转页面
    HTML拖放
    .Net实现发送邮件功能
    HTTP 400 错误
    方法(参数的传递)
    方法
    c# 属性 (get、set)
    Python和C++交互
    从Windows远程Ubuntu
    Eclipse+Tomcat WEB开发配置
  • 原文地址:https://www.cnblogs.com/hamhog/p/3574582.html
Copyright © 2011-2022 走看看