#1
  1. No Profile Picture
    http://stealthwd.ca
    Devshed Novice (500 - 999 posts)

    Join Date
    Dec 2005
    Posts
    705
    Rep Power
    202

    Command not found


    its been a long time since i've done anything linuxy, please help

    when i go to the directory with the command it works, such as...

    Code:
    sudo pdftotext /home/blaah/blaahAgain/images/test.pdf -
    It outputs my pdf nicely
    but, when i try to run it from another location, it says

    "command not found"

    Code:
    sudo /usr/local/bin/pdftotext /home/blaah/blaahAgain/images/test.pdf -
    sudo: /usr/local/bin/pdftotext: command not found
  2. #2
  3. No Profile Picture
    http://stealthwd.ca
    Devshed Novice (500 - 999 posts)

    Join Date
    Dec 2005
    Posts
    705
    Rep Power
    202
    this might work... i'm trying to run it from a php script so we'll see how it goes..

    Code:
    cd /usr/local/bin;sudo pdftotext /home/blaah/blaahAgain/images/test.pdf -
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2006
    Posts
    2,604
    Rep Power
    1765
    I suspect the sudoers file is 'wonky' inasmuch as it only references the basic name, not the fully qualified name. That is wrong, since it would allow the user (you in this case) to run ANY command so long as it was named the right thing.
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,508
    Rep Power
    4541
    On my fedora computer pdftotext is in /usr/bin not /usr/local/bin

    Try 'whereis pdftotext' to verify the location of the executable on your machine.

    Comments on this post

    • E-Oreo agrees
    ======
    Doug G
    ======
    I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton
  8. #5
  9. No Profile Picture
    http://stealthwd.ca
    Devshed Novice (500 - 999 posts)

    Join Date
    Dec 2005
    Posts
    705
    Rep Power
    202
    Originally Posted by Doug G
    On my fedora computer pdftotext is in /usr/bin not /usr/local/bin

    Try 'whereis pdftotext' to verify the location of the executable on your machine.
    The path is correct (I put it there myself, as per their docs).

    I can run it now using the method I mentioned above, but now I have the problem where I can only sudo it, if i change the perms and try to run it I get a “Segmentation fault” error.

IMN logo majestic logo threadwatch logo seochat tools logo