bin/sh^M: bad interpreter: No such file or directory

Tried to install DirectAdmin on Ubuntu just now but encounter the following error.
./setup.sh: /bin/sh^M: bad interpreter: No such file or directory

A quick Google search revealed that dos2unix can fix the problem.
sudo apt-get install dos2unix

Then fix the problem by. This will convert the file to unix format.
dos2unix setup.sh

Then just execute the file as per normal.

Comments

  1. I know this post is late, but i wanted to add for Debian, which is family of ubuntu, works with:
    apt-get install tofrodos
    THEN use [example] dos2unix setup.shthen use whatever-command ./script.sh ( ./setup.sh )Thanks for reading.

    ReplyDelete
  2. Bing Han Goh, You're missing "install" option in "apt-get" command :)

    ReplyDelete
  3. Thanks for pointing out! Updated the post :D

    ReplyDelete

Post a Comment

Popular posts from this blog

225019099301.apps.googleusercontent.com

Backup MySQL to Azure Storage in 30 Seconds

Generate GoDaddy SSL Certificate (.crt) for Azure Websites (.pfx)