Linux script execution error runserver.sh: line 2: $'\r': command not found

When starting rocketmq, mqtt has been unable to start. Looking at the log, I found that the script execution error was reported: runserver.sh: line 2: $'\r': command not found

  • Error screenshot
    insert image description here

  • Centos solution:

    • yum -y install dos2unix
      insert image description here
  • dos2unix file name
    dos2unix 你的文件名
    The author here is:dos2unix runserver.sh

  • Method Two:

    • Open the file and add in the first line
      :set ff=unix
      Save and exit

Guess you like

Origin blog.csdn.net/qq_31424825/article/details/125936465