美文网首页
mac中nodejs安装不成功

mac中nodejs安装不成功

作者: techmoney | 来源:发表于2018-05-09 11:40 被阅读0次

    1. 以前安装了java,sudo vi ~/.bash_profile

    内容如下:

    //最后添加的,奇迹发生了,node -v成功

    export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

    //认为没有node path,添加此,不成功;

    export PATH=$PATH:/usr/local/bin/node:/usr/local/bin/npm

    //以前配置java的内容,导致node -v不显示;

    JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home"

    export JAVA_HOME

    CLASS_PATH="$JAVA_HOME/lib"

    PATH=$PATH:$JAVA_HOME/bin   

    MAVEN_HOME=/Users/apple/JAVA/maven

    PATH=$PATH:$MAVEN_HOME/bin

    export MAVEN_HOME

    export PATH 

    export CATALINA_HOME=/Library/tomcat9

    ##mysql

    export PATH=$PATH:/usr/local/mysql/bin

    alias mysqlstart='sudo /usr/local/mysql/support-files/mysql.server start'

    alias mysqlstop='sudo /usr/local/mysql/support-files/mysql.server stop'

    ~   

    echo $PATH 配置成功但没看出来变化,奇怪

    ./usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin/node:/usr/local/bin/npm:/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin:/Users/apple/JAVA/maven/bin:/usr/local/mysql/bin

    相关文章

      网友评论

          本文标题:mac中nodejs安装不成功

          本文链接:https://www.haomeiwen.com/subject/rvjnrftx.html