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
  4. This comment has been removed by the author.

    ReplyDelete
  5. I enlisted some of the ideas and techniques to get
    more views and followers on this brief video making the app.To become famous on TikTok, buy tiktok likes uk
    also make TikTok videos each and every day and
    make unique content which contrasts with your audience. A few TikTokers upload short videos about a particular niche. Funny videos
    and videos that keep the audience for longer would be those who get famous on TikTok.To get famous or to get more views and enjoys
    in your own TikTok videos one simple way is to participate in TikTok challenges.

    ReplyDelete

Post a Comment

Popular posts from this blog

[Azure Websites PHP] Cross Domain request results in blank response page after Preflight HTTP OPTIONS

[Magento] Create Contact Form with Dynamic Recipient