【Mac】打开配置文件,添加/修改环境变量
【Mac】打开配置文件,添加/修改环境变量
打开文件编辑器:
进入终端mac 环境变量文件,输入open -e .bash_profile或者open -t ~/.bash_profile 打开profile文件
填写配置的环境变量:
#示例代码
export PATH=$PATH:/usr/local/bin
export ANDROID_HOME=/Users/lucky/Desktop/Auto/tools/android-sdk-macosx
PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform_tools
echo $ANDROID_HOME
PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
export JAVA_HOME=$(/usr/libexec/java_home)
export PATH=$JAVA_HOME/bin:$PATH
export CLASS_PATH=$JAVA_HOME/lib
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$JAVA_HOME/bin:$PATH:/Users/lucky/Desktop/Auto/tools/apache-tomcat-9.0.8/bin
export ANT_HOME=/Users/lucky/Desktop/Auto/tools/apache-ant-1.10.3
export PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin
# Add Cmake Root to Path
export CMAKE_ROOT=/Applications/CMake.app/Contents/bin
export PATH=$CMAKE_ROOT:$PATH
export PATH="/usr/local/opt/freetds@0.91/bin:$PATH"
PATH="/usr/local/mysql/bin:${PATH}"
export PATH
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib/
export VERSIONER_PYTHON_PREFER_64_BIT=yes
export VERSIONER_PYTHON_PREFER_32_BIT=no
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"
export PATH
保存配置:
编辑完成后保存profile文件后保存,返回终端mac 环境变量文件,输入source .bash_profile使环境变量生效
posted @ 2019-06-19 10:43Syw_文 阅读(...) 评论(...) 编辑
http://www.jiaoanw.com/%E6%95%99%E6%A1%88%E4%B8%8B%E8%BD%BD/article-50743-1.html
http://www.jiaoanw.com/
true
教案网
http://www.jiaoanw.com/%E6%95%99%E6%A1%88%E4%B8%8B%E8%BD%BD/article-50743-1.html
report
3881
【Mac】打开配置文件,添加/修改环境变量打开文件编辑器:进入终端,输入open -e .bash_profile或者open -t ~/.bash_profile 打开pro
晶晶跟几年前一样