Results 1 to 7 of 7

Thread: command in path not found?

Hybrid View

  1. #1
    Join Date
    Oct 2009
    Beans
    8

    command in path not found?

    I'm running Xubuntu 12.04 and recently installed xvnc4viewer using the synaptic package manager. The executable is located in /usr/bin, which is my $path. However, I get "xvnc4viewer: command not found" when I type the program name into a terminal window. If I type /usr/bin/xvnc4viewer the program runs. So, why doesn't the automatic path search work? Thanks, Jim Remington

  2. #2
    prodigy_ is offline May the Ubuntu Be With You!
    Join Date
    Mar 2008
    Beans
    1,219

    Re: command in path not found?

    Quote Originally Posted by jremington View Post
    $path
    It's $PATH, not $path. Use echo $PATH command to check.

  3. #3
    Join Date
    Oct 2009
    Beans
    8

    Re: command in path not found?

    Thanks but both variables $path and $PATH point to the same directories: jims-dell:/> echo $PATH /usr/local/phenix-1.8.2-1309/build/intel-linux-2.6/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

  4. #4
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: command in path not found?

    hi
    first forget "path" it's PATH !
    where do you set your PATH - hope in your ~/.bashrc (if you have a bash as login shell). be shure to set your PATH at the last line in your .bashrc.
    type in a terminal: whereis your_program_you_search_for
    and have a look at your program and type: file your_program_you_search_for
    have a look of the given format of the file ( must be ELF .... LSB executable)
    ciao
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  5. #5
    Join Date
    May 2007
    Location
    Leeds, UK
    Beans
    1,664
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: command in path not found?

    What output do you get if you run this command?

    Code:
    which xvnc4viewer
    Please create new threads for new questions.
    Please wrap code in code tags using the '#' button or enter it in your post like this: [code]...[/code].

  6. #6
    Join Date
    Oct 2009
    Beans
    8

    Re: command in path not found?

    Thanks guys. >which xvnc4viewer yields "xvnc4viewer: command not found" >whereis xvnc4viewers yields "/usr/bin/xvnc4viewer /usr/bin/X11/xvnc4viewer" >file /usr/bin/xvnc4viewer yields "xvnc4viewer: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x2b92ab1fc9ce35edb8e6fffef5da4981ca2828f3, stripped" >echo $PATH yields "/usr/local/phenix-1.8.2-1309/build/intel-linux-2.6/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" PS: is there some BBcode or setting I can use to maintain the line formatting of my response? Everything is run together.
    Last edited by jremington; March 6th, 2013 at 12:28 AM.

  7. #7
    Join Date
    May 2007
    Location
    Leeds, UK
    Beans
    1,664
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: command in path not found?

    If you use the "Reply to Thread" button, rather than "Post Quick Reply", the edit window has a button marked with a "#" symbol. This will wrap selected text in code tags. For example:

    Code:
    which xvnc4viewer yields "xvnc4viewer: command not found"
    whereis xvnc4viewers yields "/usr/bin/xvnc4viewer /usr/bin/X11/xvnc4viewer"
    file /usr/bin/xvnc4viewer yields "xvnc4viewer: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0x2b92ab1fc9ce35edb8e6fffef5da4981ca2828f3, stripped"
    echo $PATH yields "/usr/local/phenix-1.8.2-1309/build/intel-linux-2.6/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
    Once you've seen the "code" tags in a post, you can also enter them by hand. I'm assuming the second command was actually "whereis xvnc4viewer".

    As far as the issue is concerned, the key seems to be that "which" doesn't find the program but "whereis" does.

    From man which
    which returns the pathnames of the files (or links) which would be exe‐
    cuted in the current environment, had its arguments been given as com‐
    mands in a strictly POSIX-conformant shell. It does this by searching
    the PATH
    for executable files matching the names of the arguments. It
    does not follow symbolic links.
    From man whereis
    whereis locates source/binary and manuals sections for specified files.
    The supplied names are first stripped of leading pathname components
    and any (single) trailing extension of the form .ext, for example, .c.
    Prefixes of s. resulting from use of source code control are also
    dealt with. whereis then attempts to locate the desired program in a
    list of standard Linux places
    .
    Perhaps you could try using the guest account on your machine and see if it works from there? If it does, I think that would indicate that the path ($PATH) in your account is the problem. There's nothing that I can see in your output that indicates that, so something else must be at work here.

    Another suggestion would be to try re-installing the package.

    Code:
    sudo apt-get install --reinstall xvnc4viewer
    Please create new threads for new questions.
    Please wrap code in code tags using the '#' button or enter it in your post like this: [code]...[/code].

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
  •