Find the answer to your Linux question:
Results 1 to 2 of 2
Hi , I am running shell command through C program using system() routine. I am executing "opcontrol --status" an executable using the this routine and I get the following error. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2010
    Posts
    1

    system() rountine returns: access: unix error (2) No such file or directory


    Hi ,

    I am running shell command through C program using system() routine.

    I am executing "opcontrol --status" an executable using the this routine and I get the following error.
    access: unix error (2) No such file or directory

    But when I give the complete path to the executable it runs perfectly.

    The executable is installed in "/usr/local/bin/"
    And the path variable has this path.

    What can be the possible issue?

    Thanks
    Abhishek.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,397
    Is the trailing slash in /usr/local/bin/ also in the PATH environment? If so, this is likely your problem. Please post the complete output of the PATH environment when you run your program.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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