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.

  • 相关阅读:
    create-react-app
    简单的PHP的任务队列
    Yii框架中使用PHPExcel导出Excel文件
    Android 使用全局变量的问题
    Android 退出整个应用程序
    new DialogInterface.OnClickListener()报错的解决办法
    Yii 日期时间过滤列 filter
    Yii 时间戳格式化显示的问题
    PullToRefreshListView 应用讲解
    Android:Layout_weight的深刻理解
  • 原文地址:https://www.cnblogs.com/taoge007/p/5961348.html
Copyright © 2011-2022 走看看