0

I built and install OCAML on my Mac and wanted run an ocaml binary file namely test So I did ./test and I got:

-bash: ./test: /home/linkenhe/usr/local/godi/bin/ocamlrun: bad interpreter: No such file or directory

How should I fix it?

Thanks

1 Answer 1

0

The file test is a bytecode file, not a binary file.

Where did you get the file test? The problem is that it's looking for the OCaml bytecode interpreter in the wrong place.

If you have installed OCaml, you should have a program named ocamlrun. You should check that you do. If so, you can run test like this:

# Test that ocamlrun exists
$ which ocamlrun
/usr/local/bin/ocamlrun

# Use it to run bytecode.
$ ocamlrun test

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.