3

I recently installed Android Studio , and to make the changes permanent I changed the PATH environment variable in .bashrc file, as shown in Second answer of this link.

I get following error messages or warning sort of things every time I launch a new terminal window.

bash: export: '=': not a valid identifier

bash: export: /home/android-studio/bin/:/usr/games:/home/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin: ~/android-studio/bin': not a valid identifier`

This is what I did I opened .bashrc file using following command

nano .bashrc

then added following lines to .bashrc file.

export PATH = "$PATH:~/android-studio/bin"

Following is value in my path Variable

bash: /home/android-studio/bin: Is a directory
Chinmaya B
  • 6,122
  • 7
  • 24
  • 43
  • What is given when you run echo $PATH, and what line did you add to your .bashrc file? And did you run the echo 'export PATH="~/android-sdk/android-studio/bin/:$PATH"' >> ~/.bashrc command? You many need to run source ~/.bashrc or login/logout after making chanes to the ~/.bashrc file (may not be a good idea if it is broken though) – Wilf Feb 20 '15 at 16:44
  • 1
    Could you add output of this command to question: grep "export" ~/.bashrc – c0rp Feb 20 '15 at 16:45

1 Answers1

2

Remove spaces between = sign. It should look like:

export PATH="$PATH:~/android-studio/bin"

not

export PATH = "$PATH:~/android-studio/bin"
c0rp
  • 9,820
  • 3
  • 38
  • 60