2

This question already has an answer here:

I am trying to start supervisor service supervisor start, as root, but it gives me

env: /etc/init.d/supervisor: No such file or directory

Yet, I can clearly see that file exists:

[root@master vagrant]# ls -l /etc/init.d/ total 256

-rwxr-xr-x. 1 root root 2062 Oct 17 2014 atd
-rwxr-xr-x. 1 root root 3378 Jun 22 2012 auditd
-rwxr-xr-x. 1 root root 2826 Nov 23 2013 crond
-rw-r--r--. 1 root root 18586 Oct 10 2013 functions
-rwxr-xr-x. 1 root root 5866 Oct 10 2013 halt
-rwxr-xr-x. 1 root root 10804 Nov 23 2013 ip6tables
-rwxr-xr-x. 1 root root 10688 Nov 23 2013 iptables
-rwxr-xr-x. 1 root root 652 Oct 10 2013 killall
-r-xr-xr-x. 1 root root 2134 Nov 23 2013 lvm2-lvmetad
-r-xr-xr-x. 1 root root 2665 Nov 23 2013 lvm2-monitor
-rwxr-xr-x. 1 root root 2989 Oct 10 2013 netconsole
-rwxr-xr-x. 1 root root 5428 Oct 10 2013 netfs
-rwxr-xr-x. 1 root root 6334 Oct 10 2013 network
-rwxr-xr-x. 1 root root 6364 Nov 22 2013 nfs
-rwxr-xr-x. 1 root root 3526 Nov 22 2013 nfslock
-rwxr-xr-x. 1 root root 3852 Dec 3 2011 postfix
-rwxr-xr-x. 1 root root 5383 Mar 30 08:29 postgresql
-rwxr-xr-x. 1 root root 1513 Sep 17 2013 rdisc
-rwxr-xr-x. 1 root root 1822 Nov 22 2013 restorecond
-rwxr-xr-x. 1 root root 2073 Feb 22 2013 rpcbind
-rwxr-xr-x. 1 root root 2518 Nov 22 2013 rpcgssd
-rwxr-xr-x. 1 root root 2305 Nov 22 2013 rpcidmapd
-rwxr-xr-x. 1 root root 2464 Nov 22 2013 rpcsvcgssd
-rwxr-xr-x. 1 root root 2011 Aug 15 2013 rsyslog
-rwxr-xr-x. 1 root root 3085 May 11 21:07 salt-master
-rwxr-xr-x. 1 root root 3332 May 11 21:07 salt-minion
-rwxr-xr-x. 1 root root 1698 Nov 22 2013 sandbox
-rwxr-xr-x. 1 root root 2056 Feb 27 15:57 saslauthd
-rwxr-xr-x. 1 root root 647 Oct 10 2013 single
-rwxr-xr-x. 1 root root 4534 Nov 22 2013 sshd
-rwxr-xr-x. 1 root root 1345 Jun 11 10:20 supervisor
-rwxr-xr-x. 1 root root 2294 Nov 22 2013 udev-post
-rwxr-xr-x. 1 root root 15634 Mar 7 2014 vboxadd
-rwxr-xr-x. 1 root root 5378 Mar 7 2014 vboxadd-service
-rwxr-xr-x. 1 root root 20887 Mar 7 2014 vboxadd-x11

And it contains some script, as expected.

What am I doing wrong?

marked as duplicate by Gilles, slm Jun 12 '15 at 1:05

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    I disagree that this is a duplicate of the marked question. In the marked question, it was clear that something about the first line of the script was wrong, whereas here, it was not clear (at least to me) where the error even was. The benefit of the answer to this question is stating that the error is in the first line. Only with this knowledge given is the linked question helpful. However I agree it is closely related. – kutschkem Jun 12 '15 at 7:17
0

It's not complaining about the /etc/init.d/supervisor file itself, but most likely about the file it wants to execute as - usually the shell that appears on the shebang line in that file. It's a somewhat misleading error that I've seen many times before.

  • 1
    That was /bin/bash... but the file for some reason had windows newlines, and that's why /bin/bash^M wasn't found!? Thanks, that was it! :-) I think the problem is that I checked out a git repo on windows and used the files in a Linux VM, probably the line endings were changed at check-out. I need to check the rest now... – kutschkem Jun 11 '15 at 13:36
  • Yeah, ^M's are what usually pop that error message up for me, too. That's why I'm so appreciative to whomever wrote dos2unix. – John Jun 11 '15 at 13:37

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