Question

Does anyone know how I can to install Gradle into a Cloud 9 workspace?

These are my current instructions:

linux> wget http://services.gradle.org/distributions/gradle-1.10-bin.zip
linux> unzip -q gradle-1.10-bin.zip -d /usr/local/                # <== GET STUCK HERE
linux> echo "export GRADLE_HOME=/usr/local/gradle-1.10" >> .profile
linux> echo "export PATH=$PATH:$GRADLE_HOME/bin" >> .profile

But I get the following error when I type: unzip -q gradle-1.10-bin.zip -d /usr/local/

quinnliu@walnutiq:~/743682 (master) $ unzip -q gradle-1.10-bin.zip -d /usr/local/
checkdir error:  cannot create /usr/local/gradle-1.10
                 Permission denied
                 unable to process gradle-1.10/.
checkdir error:  cannot create /usr/local/gradle-1.10
                 Permission denied
                 unable to process gradle-1.10/getting-started.html.

Is there some kind of work around?

Was it helpful?

Solution

It looks like you do not have permissions to make changes to /usr/local. /usr is normally owned by root. The only way you can install there is to either use sudo or login as root. If you do not have root access, contact the support forum to request for this or that gradle is installed by support.

$ ls -lrt /usr
total 8
drwxrwxr-x     7 root  admin    238 16 May  2011 bin
drwxr-xr-x     4 root  wheel    136 29 Jun  2011 etc

gradle can run from anywhere. So instead do this. You will have access to your home directory (~). The home directory can be substituted for another directory.

cd ~          #Go to home directory
mkdir gradle  #Create gradle directory
cd gradle     #Enter gradle directory
wget http://services.gradle.org/distributions/gradle-1.10-bin.zip  #Download gradle
unzip -q gradle-1.10-bin.zip  #Unzip gradle
echo "export GRADLE_HOME=~/gradle" > ~/.profile
echo "export PATH=$GRADLE_HOME/bin:$PATH" > ~/.profile
source ~/.profile    #Re-read your profile

Then your can run gradle --version to check that it is working. Run which gradle to check that the path is ~/gradle/bin

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top