You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
---
|
|
|
|
|
icon: edit
|
|
|
|
|
date: 2023-04-02
|
|
|
|
|
category:
|
|
|
|
|
- 系统配置
|
|
|
|
|
headerDepth: 5
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 各种软件应用,编程语言开发工具包默认安装路径环境变量配置
|
|
|
|
|
# 编程语言
|
|
|
|
|
## nodejs:
|
|
|
|
|
### 环境变量
|
|
|
|
|
NODE_HOME: sdk 路径
|
|
|
|
|
NODE_PATH: nodejs 查找包的路径 一般指全局安装路径下 node_modules文件夹
|
|
|
|
|
### 配置:
|
|
|
|
|
```prefix``` 全局安装node_cache的路径
|
|
|
|
|
```cache``` 安装node_cache缓存位置
|
|
|
|
|
#### 命令
|
|
|
|
|
```shell
|
|
|
|
|
npm config set prefix "sdk 路径\node_global"
|
|
|
|
|
npm config set cache "sdk 路径\node_cache"
|
|
|
|
|
```
|
|
|
|
|
#### 配置文件
|
|
|
|
|
也可以在用户目录下修改```.npmrc```文件来指定
|
|
|
|
|
```
|
|
|
|
|
prefix=sdk 路径\node_global
|
|
|
|
|
cache=sdk 路径\node_cache
|
|
|
|
|
```
|
|
|
|
|
### path 修改
|
|
|
|
|
path 需配置添加 node_global路径 ,和 %NODE_HOME%\bin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## java
|
|
|
|
|
### 环境变量
|
|
|
|
|
JAVA_HOME: sdk路径
|
|
|
|
|
### path 修改
|
|
|
|
|
path 需配置添加 %JAVA_HOME%\bin
|
|
|
|
|
|
|
|
|
|
## golang
|
|
|
|
|
### 环境变量
|
|
|
|
|
GOROOT: sdk路径
|
|
|
|
|
GOPATH: 依赖包安装路径
|
|
|
|
|
### path 修改
|
|
|
|
|
path 需配置添加 %GOROOT%\bin ,%GOPATH%\bin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## kotlin
|
|
|
|
|
### 环境变量
|
|
|
|
|
KONAN_DATA_DIR: 数据缓存路径
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 工具
|
|
|
|
|
## gradle
|
|
|
|
|
### 环境变量
|
|
|
|
|
GRADLE_HOME: gradle安装路径
|
|
|
|
|
GRADLE_USER_HOME: 用户缓存数据路径
|
|
|
|
|
### path 修改
|
|
|
|
|
path 需配置添加 %GRADLE_HOME%\bin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## android
|
|
|
|
|
### 环境变量
|
|
|
|
|
ANDROID_SDK_ROOT: sdk路径
|
|
|
|
|
ANDROID_SDK_HOME: 用户缓存和虚拟机数据路径,
|
|
|
|
|
|
|
|
|
|
## vcpkg
|
|
|
|
|
### 环境变量
|
|
|
|
|
VC_PKG_HOME: vcpkg 安装路径
|
|
|
|
|
VCPKG_DEFAULT_BINARY_CACHE:vcpkg 下载二进制安装包缓存路径
|
|
|
|
|
### path 修改
|
|
|
|
|
path 需配置添加 %VC_PKG_HOME%
|