zoukankan      html  css  js  c++  java
  • 源码编译Nodejs 4.6 on CentOS6

    1、本来是要按照个newman程序,无奈newman必须要node版本>=4,所以不得不安装node4.6

    下载地址:https://nodejs.org/dist/v4.6.0/node-v4.6.0.tar.gz

    2、下载之后解压编译安装

    ./configure --prefix=/opt/node-v4.6.0

    无奈报错:

    WARNING: 

    3、So,不得不得到更高版本的g++

    (1)、curl http://linuxsoft.cern.ch/cern/scl/slc6-scl.repo > /etc/yum.repos.d/slc6-scl.repo

    (2)、rpm --import http://ftp.mirrorservice.org/sites/ftp.scientificlinux.org/linux/scientific/51/i386/RPM-GPG-KEYs/RPM-GPG-KEY-cern
    (3)、yum install -y devtoolset-3

    (4)、scl enable devtoolset-3 bash    #临时改变gcc版本,需要永久生效的话,写在配置文件中(.bashrc)

    4、之后执行

      make && make install

    5、安装node完毕后,要配置一下node环境变量

      (vim /etc/profile.d/node.sh ;

      PATH=$PATH:/opt/node-v4.6.0/bin

       source /etc/profile.d/node.sh),

    6、验证一下安装成功是否

      node --version

      npm --version

    7、再来安装newman,并验证( newman --version )

      npm install newman --global

    注:copr.fedoraproject.org 提供了第三方构建的 devtoolset-3/4 的仓库, 可直接添加yum源repo后体验 devtoolset-3(gcc-4.9.2) devtoolset-4(gcc-5.2.1),

    免去自己构建编译 gcc 麻烦 )

    devtoolset-3 - Developer Toolset is designed for developers working on CentOS or Red Hat Enterprise Linux platform. It provides current versions of the GNU Compiler Collection, GNU Debugger, Eclipse development platform, and other development, debugging, and performance monitoring tools.

  • 相关阅读:
    pacx & zr(yet)
    FileInputStream RandomAccessFile FileChannel 与 MappedByteBuffer (yet)
    结合自定义注解的 spring 动态注入
    redis事务与管道区别
    jdk动态代理与cglib优势劣势以及jdk动态代理为什么要interface
    maven scope属性值设置含义
    xc (yet)
    单链表 环
    适配器模式,将老接口的数据给新接口用
    移动硬盘无法拷贝大于4G的文件
  • 原文地址:https://www.cnblogs.com/taoge007/p/5961348.html
Copyright © 2011-2022 走看看