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

    Join Date
    Dec 2005
    Posts
    688
    Rep Power
    200

    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
    688
    Rep Power
    200
    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 Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,400
    Rep Power
    1688
    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
    Stumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,409
    Rep Power
    4538
    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
    ======
    It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi
  8. #5
  9. No Profile Picture
    http://stealthwd.ca
    Devshed Novice (500 - 999 posts)

    Join Date
    Dec 2005
    Posts
    688
    Rep Power
    200
    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