mac中nodejs安装不成功

2018-05-09  本文已影响0人  techmoney

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

上一篇下一篇

猜你喜欢

热点阅读