Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: PATH$ error

Hybrid View

  1. #1
    Join Date
    Apr 2012
    Location
    Missouri, USA
    Beans
    94
    Distro
    Ubuntu

    [SOLVED] PATH$ error

    Welcome to all! I haven't been on ubuntuforums for a while, meaning i haven't had any problems, but alas! I have yet another problem and need your peaoples help. I was installing something using terminal, and the PATH$ said that i need to choose the location of the path. I did so, and the command worked fine. The problem is, every time i enter a command involving path, i get the error

    The command could not be located because '/usr/bin (in this case, any location)' is not included in the PATH environment variable.
    How do i fix this??? How do i get the PATH$ back to what it's suppose to be?Thanks for your time and help,
    Linux Junkie
    Last edited by linux junkie; February 7th, 2013 at 02:53 AM.

  2. #2
    Join Date
    Sep 2006
    Beans
    7,817
    Distro
    Lubuntu Development Release

    Re: PATH$ error

    If you close the terminal and open it again, the $PATH should be reset to what is set in ~/.profile or /etc/environment. That is, if you did not change it in ~/.bashrc or ~/.profile. Where did you change it?

  3. #3
    Join Date
    Apr 2012
    Location
    Missouri, USA
    Beans
    94
    Distro
    Ubuntu

    Re: PATH$ error

    Not sure where, but i think i permanently changed the path.

  4. #4
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: PATH$ error

    Try to repair it booted from a live system: Boot from your Ubuntu install CD/USB drive.

    Run
    Code:
    sudo fdisk -lu
    and
    Code:
    sudo blkid
    to identify your partitions.

    Mount the root partition of the installed ubuntu system, probably /dev/sda1, /dev/sda5 or /dev/sda6. Use the file browser to mount/umount. Let's say your system is mounted on /media/ubuntu (the name may vary depending of if you use labels).

    Code:
    sudo cp /media/ubuntu/etc/environment /media/ubuntu/etc/environment.old
    and edit the file with
    Code:
    sudo nano /media/ubuntu/etc/environment
    But if that file is good, and your path is still bad, it is changed somewhere. Check also the locations suggested by Lars Noodén, where ~ should translate to something like
    Code:
    /media/ubuntu/home/jeremiah
    when running the live system.

    You might also try to search for PATH= in the /etc directory

    Code:
    sudo grep -r "PATH=" /media/ubuntu/etc/*
    and for android-sdk-linux
    Code:
    sudo grep -r "android-sdk-linux" /media/ubuntu/etc/*
    which might help you find where your path is reset.

  5. #5
    Join Date
    Apr 2012
    Location
    Missouri, USA
    Beans
    94
    Distro
    Ubuntu

    Re: PATH$ error

    So, basically reset my PATH$? I have used commands before, but never got too far into it, and sadly your help doesn't make too much sense, lol... But i could look up like a tutorial and follow that, right? Or make your commands a wee bit easier to understand for me? The partition is /dev/sda2 i don't think it has a name other than that... And my username is jeremiah . So, could you make your commands fit these specifications? It would be great...

  6. #6
    Join Date
    Nov 2011
    Location
    /dev/root
    Beans
    Hidden!

    Re: PATH$ error

    Quote Originally Posted by linux junkie View Post
    So, basically reset my PATH$? I have used commands before, but never got too far into it, and sadly your help doesn't make too much sense, lol... But i could look up like a tutorial and follow that, right? Or make your commands a wee bit easier to understand for me? The partition is /dev/sda2 i don't think it has a name other than that... And my username is jeremiah . So, could you make your commands fit these specifications? It would be great...
    0. Boot from the install CD/USB drive

    1. Use the file browser to mount /dev/sda2 (click on its icon in the left panel)

    2. Run the command
    Code:
    df
    and post the output.

    Then I will try to give detailed instructions

  7. #7
    Join Date
    Jun 2006
    Location
    Rockville, MD
    Beans
    29
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: PATH$ error

    Quote Originally Posted by Lars Noodén View Post
    If you close the terminal and open it again, the $PATH should be reset to what is set in ~/.profile or /etc/environment. That is, if you did not change it in ~/.bashrc or ~/.profile. Where did you change it?
    I think this is the answer. Have you checked ~/.bashrc and ~/.profile for any lines that set $PATH? They would start with PATH=... or export PATH=...

    Please do this before you go to the trouble of rebooting into a live CD and doing a lot more complicated stuff (Occam's Razor here, people).

  8. #8
    Join Date
    Apr 2012
    Location
    Missouri, USA
    Beans
    94
    Distro
    Ubuntu

    Re: PATH$ error

    So, do i just enter ~/.bashrc and ~/.profile? The result was: bash: /home/jeremiah/.bashrc: Permission denied

  9. #9
    Join Date
    Jun 2006
    Location
    Rockville, MD
    Beans
    29
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: PATH$ error

    Quote Originally Posted by linux junkie View Post
    So, do i just enter ~/.bashrc and ~/.profile? The result was: bash: /home/jeremiah/.bashrc: Permission denied
    No, you need to edit those files. If you're stuck in a command-line, try using nano, so
    Code:
    nano ~/.bashrc
    Look for a line that changes PATH, and delete it (or at least, fix it).

  10. #10
    Join Date
    Apr 2012
    Location
    Missouri, USA
    Beans
    94
    Distro
    Ubuntu

    Re: PATH$ error

    Command 'nano' is available in the following places
    * /bin/nano
    * /usr/bin/nano
    The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.
    nano: command not found
    This was the output.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •