2

So I was just taking a look at the example posted on the dlang website here: http://dlang.org/rdmd.html and was looking to do something like the second version where you define #!/usr/bin/env rdmd as the first line of your file. I copied and pasted the exact copy of what they have there just to try it out and everytime I try to do ./myprog.d I get: : No such file or directory

What am I missing here? If I run rdmd ./myprog.d it works just fine so I know rdmd is in the proper path

5
  • did you also make the file executable? chmod +x myprog.d, though if you didn't I think the error would b e permission denied rather than no such file... another thing to check is if the /usr/bin/env command actually runs on your system. You might be better off just putting the direct path to your rdmd in there like #!/home/me/dmd2/linux/bin32/rdmd is how I'd do it on my computer. Commented Jan 24, 2015 at 21:21
  • It is executable (774) and /usr/bin/env is on my system and I can do /usr/bin/env rdmd myproog.d and it works fine. Putting the absolute path does not work as bash complains that its a bad interpreter. Commented Jan 24, 2015 at 21:26
  • 1
    hmm it might be trying to run the 32 bit version on a 64 bit system or vice versa... in fact I'm almost certain that's the problem, that gives "no such file or directory" because the /lib/ld-Linux for the bittiness isn't there. So the fix would be maybe just deleting the one so it forces the use of the other from the path Commented Jan 24, 2015 at 21:30
  • "smells" like rdmd is not in your path. Commented Jan 24, 2015 at 22:22
  • echo $PATH: /usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/me/.local/bin:/home/me/bin which rdmd: /usr/bin/rdmd Commented Jan 24, 2015 at 22:23

2 Answers 2

7

This is nice(hard) one. I like this kind of issues. You have wrong newline delimeter, probally \r\n instead of \n

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks a bunch, turns out I forgot to mark unix style endings cause I was editing this on my windows machine over a network share.
This was one of reasons Why I almost doesn't finish my university (bad newlines in makefile :)).
1

Some Unixen have env in /bin, others in /usr/bin. Find where yours is by executing which env. Then use that one.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.