1

I'm trying to learn to build and poke around open source software. However, I've always had trouble trying to get anything to build. So, I figure now's as good a time as any to ask.

I downloaded the repo linked on this site: OpenHub link to ZeroMQ.

I am having trouble running the autogen.sh script in Ubuntu. The Install file says all I must do is run this script. However, I get the following error:

libzmq$ ./autogen.sh 
bash: ./autogen.sh: /bin/sh^M: bad interpreter: No such file or directory

I have made the script executable, so I don't know what's wrong. The file is obviously there, and the first line indicates that it is a Bash script. Has anyone had this kind of issue before?

Biffen
  • 6,249
  • 6
  • 28
  • 36
newbie
  • 607
  • 2
  • 8
  • 16
  • 1
    It looks like you have `\r\n` line endings in the `autogen.sh` file. Run `dos2unix` on it. Where did you get it from anyway? – Biffen Apr 16 '15 at 05:41
  • Hmm, thanks for the input. How can you tell? Here's the direct link to the repo: [ZeroMQ repo](git://github.com/zeromq/libzmq.git) – newbie Apr 16 '15 at 05:42
  • The `^M` in `/bin/sh^M`. Did you get it via Git? Have you configured line ending handling in Git somehow? BTW, it's a *shell script*, not a Bash script. – Biffen Apr 16 '15 at 05:43
  • Ah, I see. That's a good thing to remember. Also, forgive my incorrect usage of the terminology, but why is calling it a "bash script" incorrect? – newbie Apr 16 '15 at 05:45
  • Because the shebang is `#!/bin/sh`, so it has nothing to do with Bash. A Bash script would typically have `#!/bin/bash`. – Biffen Apr 16 '15 at 05:47
  • Ah, sh vs. bash? Thanks. I shouldn't gloss over details like that. Especially as an aspiring programmer. – newbie Apr 16 '15 at 05:47
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/75353/discussion-between-newbie-and-biffen). – newbie Apr 16 '15 at 05:54

0 Answers0