# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
export PKG_CONFIG=/usr/bin/pkg-config
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PATH=/usr/local/ffmpeg/bin:$PATH
export NDK=/home/liquanan/android-ndk-r10e
# 我们的ANDROID_NDK和ANDROID_SDK 路径
ANDROID_NDK=${NDK}
export ANDROID_NDK
export PATH=${PATH}:${NDK}
export ANDROID_HOME=/home/liquanan/Android/Sdk
export PATH=${ANDROID_HOME}/platform-tools:$PATH
export PATH=${ANDROID_HOME}/tools/bin:$PATH
export NODE_PATH=/usr/local/lib/node_modules
export JAVA_HOME=/usr/local/jdk/jdk1.8.0_161
export PATH=$JAVA_HOME/bin:$PATH
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JAVA_HOME}/lib/tools.jar
if [ "${PS1-}" ]; then
if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then
# The file bash.bashrc already sets the default PS1.
# PS1='\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi
上面的文件是etc/profile ,在该文件中添加以下环境变量
export NDK=/home/liquanan/android-ndk-r10e
# 我们的ANDROID_NDK和ANDROID_SDK 路径
ANDROID_NDK=${NDK}
export ANDROID_NDK
export PATH=${PATH}:${NDK}
export ANDROID_HOME=/home/liquanan/Android/Sdk
export PATH=${ANDROID_HOME}/platform-tools:$PATH
export PATH=${ANDROID_HOME}/tools/bin:$PATH
export NODE_PATH=/usr/local/lib/node_modules
export JAVA_HOME=/usr/local/jdk/jdk1.8.0_161
export PATH=$JAVA_HOME/bin:$PATH
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JAVA_HOME}/lib/tools.jar
然后参照readme的步骤即可