Command is available in …; The command could not be located

I have a problem in my terminal. I’ve just downloaded an Android emulator and this happens on my terminal. I’ve been using Ubuntu 12.04.

Command 'lesspipe' is available in the following places
 * /bin/lesspipe
 * /usr/bin/lesspipe
The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.
lesspipe: command not found
Command 'dircolors' is available in '/usr/bin/dircolors'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
dircolors: command not found
Command 'uname' is available in '/bin/uname'
The command could not be located because '/bin' is not included in the PATH environment variable.
uname: command not found
bash: [: =: unary operator expected
Command 'sed' is available in '/bin/sed'
The command could not be located because '/bin' is not included in the PATH environment variable.
sed: command not found
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not found

Answer

Run the following:

export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:/home/sweet/android-sdk-linux/platfrom-tools

Now try to execute the commands.

if you want to save it permanently so that you don’t need to type it over and over again open ~/.bashrc using gedit by /usr/bin/gedit ~/.bashrc and find the line {PATH}:/home/sweet/android-sdk-linux/platfrom-tools. Then either delete that line or put a # in front of it to comment it out. Then add the following line:

export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:/home/sweet/android-sdk-linux/platfrom-tools

now save the file and from the terminal run source ~/.bashrc so that your path is properly set from the current terminal session.

Attribution
Source : Link , Question Author : Sweetzelyn Sarmiento , Answer Author : heemayl

Leave a Comment