I installed gradle in /opt/gradle-2.2.1
I edited /etc/environment to look like this
GRADLE_HOME="/opt/gradle-2.2.1"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$GRADLE_HOME/bin"
If I run source /etc/environment gradle works as expected, but if I open a new terminal I keep getting this error message The program 'gradle' is currently not installed whenever I try to run gradle.
I trade to trace the problem by running a couple of obvious things
$ echo $GRADLE_HOME
/opt/gradle-2.2.1
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$GRADLE_HOME/bin
$ source /etc/environment
$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/gradle-2.2.1/bin
You can see after running source the path is correct. I'm not sure why this is not resolving the first time around. Maybe the problem is that I don't understand what /etc/environment is for
Aucun commentaire:
Enregistrer un commentaire