-bash: export: ` PATH=/usr/local/java/jdk1.8.0_361/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin': not a valid identifier
解决方法:
-bash: export: ` PATH=/usr/local/java/jdk1.8.0_361/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin': not a valid identifier
执行source /etc/profile时报错。
export JAVA_HOME=/usr/local/java/jdk1.7.0_80
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
原因是export PATH=${JAVA_HOME}/bin:$PATH中的export后面的空格多了一个,无语了