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

Thread: ...not included in the PATH environment variable

  1. #1
    Join Date
    Mar 2010
    Beans
    3

    ...not included in the PATH environment variable

    Dear,

    Today I installed a code for my simulation and something wrong happens. I can not log in normally anymore and I have to come to failsafe-session.

    Code:
    /etc/gdm/Xsession: Beginning session setup...
    /etc/profile: 33: source: not found
    /etc/gdm/Xsession: 192: ls: not found
    /etc/gdm/Xsession: Executing /usr/bin/gnome-session failed, will try to run x-terminal-emulatorexec: 205: x-terminal-emulator: not found

    When I just go into failsafe-session, I got:

    Code:
    Command 'lesspipe' is available in '/usr/bin/lesspipe'
    The command could not be located because '/usr/bin' is not included in the PATH environment variable.
    bash: 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.
    bash: 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.
    bash: uname: 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.
    bash: uname: command not found
    bash: [: !=: unary operator expected
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: =: unary operator expected
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: too many arguments
    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.
    bash: sed: command not found

    In failsafe-session, I tried to look around but every times I give a command (even simple as ls-, sudo- ...) Ubuntu tells me that:

    Code:
    Command 'ls' is available in '/bin/ls'
    The command could not be located because '/usr/bin' is not included in the PATH environment variable.
    
    Command 'sudo' is available in '/usr/bin/sudo'
    The command could not be located because '/usr/bin' is not included in the PATH environment variable.
    Could anyone please help me to solve this problem, I stuck there and can not do anything now ?

    Thank you for your time,
    Chi

  2. #2
    Join Date
    Jan 2009
    Beans
    Hidden!

    Re: ...not included in the PATH environment variable

    What does your /etc/environment file look like? Mine looks like this:
    Code:
    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
    If the content of the file looks OK, what about the premissions?:
    Code:
    $ ls -l /etc/environment
    -rw-r--r-- 1 root root 79 2010-03-16 14:44 /etc/environment
    Is yours readable by the group and the world?

  3. #3
    Join Date
    Mar 2010
    Beans
    3

    Re: ...not included in the PATH environment variable

    Hi Brandon,

    I can not give any command at all, every time I tried I got a message:

    Code:
    The command could not be located because '/usr/bin' is not included in the PATH environment variable.
    even with ls- or env.

    How can I check my environment variable without using command ?

  4. #4
    Join Date
    Jan 2009
    Beans
    Hidden!

    Re: ...not included in the PATH environment variable

    Just set the PATH variable on the command line:
    Code:
    export PATH=/usr/bin:/bin

  5. #5
    Join Date
    Mar 2010
    Beans
    3

    Re: ...not included in the PATH environment variable

    Thanks Brandon for your help, the problem was solved with that command line ^_^


  6. #6
    Join Date
    Jun 2010
    Beans
    26

    Re: ...not included in the PATH environment variable

    Hello

    I have a very weird issue for 2 days

    I setup the server 4 months ago and it never happened before.

    I use to type : ffmpeg <file> to analyse the encoding of video file before sending to conversion

    Since 2 days ago I get this

    Command 'ffmpeg' is available in '/usr/local/bin/ffmpeg'
    The command could not be located because '/usr/local/bin' is not included in the PATH environment variable.
    -bash: ffmpeg: command not found
    However in the /etc/environment file, I have

    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
    LANG="en_US.ISO-8859-15"
    LANGUAGE="en_US:en:en_GB:en"
    so I assume this is ok.

    If I export the path using the previous post command line, then the echo $PATH is good again, but only for some time , like some hours, then it goes back to

    root@server:~# echo $PATH
    /usr/bin:/bin:/usr/sbin:/sbin
    As you can see I am logging using the root account. I have no idea why this now happens, I didn't install anything lately

  7. #7

    Re: ...not included in the PATH environment variable

    When i start the terminal it always so the message, like this and please tell me the what is the default bashrc

    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
    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
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: =: unary operator expected
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: too many arguments
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: =: unary operator expected
    bash: [: too many arguments
    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 'sort' is available in '/usr/bin/sort'
    The command could not be located because '/usr/bin' is not included in the PATH environment variable.
    sort: command not found
    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 '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
    bash: /home/tikam/TikamChandrakar/Androide/android-sdk-linux_x86: No such file or directory
    tikam@tikam-desktop:~$ vi ./bashrc
    Command 'vi' is available in '/usr/bin/vi'
    The command could not be located because '/usr/bin' is not included in the PATH environment variable.
    vi: command not found
    tikam@tikam-desktop:~$ export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/bin/X11:/usr/local/bin

  8. #8
    Join Date
    Nov 2008
    Location
    Oita, Japan
    Beans
    419
    Distro
    Ubuntu

    Exclamation Re: ...not included in the PATH environment variable

    Quote Originally Posted by tikamchandrakar@gmail.com View Post
    When i start the terminal it always so the message, like this and please tell me the what is the default bashrc
    I'm having a similar problem. Tried to set a different path with ~/.bashrc, ~/.profile, /etc/profile, /etc/environment, /etc/login.defs, crontab, pam.d etc etc etc.

    Nothing will give me a permanent, system-wide, PATH.

    The files in ~/ only affect gnome-terminal.

    Everything else is ignored or overridden somewhere.

    I can't run applications from shortcuts or the terminal if their executable is outside of /usr/local/bin:/usr/bin:/bin

  9. #9
    Join Date
    Jul 2011
    Beans
    2

    Re: ...not included in the PATH environment variable

    Quote Originally Posted by Brandon Williams View Post
    Just set the PATH variable on the command line:
    Code:
    export PATH=/usr/bin:/bin


    Thanks a lot Brandon....really seemed to b in trouble

  10. #10
    Join Date
    Nov 2009
    Beans
    8

    Re: ...not included in the PATH environment variable

    Quote Originally Posted by quequotion View Post
    I'm having a similar problem. Tried to set a different path with ~/.bashrc, ~/.profile, /etc/profile, /etc/environment, /etc/login.defs, crontab, pam.d etc etc etc.

    Nothing will give me a permanent, system-wide, PATH.

    The files in ~/ only affect gnome-terminal.

    Everything else is ignored or overridden somewhere.

    I can't run applications from shortcuts or the terminal if their executable is outside of /usr/local/bin:/usr/bin:/bin
    I know this is old issue but I face with same problem and google brought me here. After a few try I solved my problem by adding this line

    Code:
    PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
    to the top of
    Code:
    /etc/bash_completion
    I hope this helps you too.

Page 1 of 2 12 LastLast

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
  •