2

Trying install the Lotion on my Ubuntu.

When running

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

it throws the error.

I then cd into that folder and found the bash folder is there.

enter image description here

how to fix it?

3
  • 2
    How did you download this? Can you post the entire script? That ^M looks like a Windows enter key. Sep 27, 2020 at 4:40
  • @ajgringo619 I downloaded it from the github directly by git clone xxx . I have figured it out and will post an answer here. thanks man
    – Franva
    Sep 27, 2020 at 4:41
  • To print a ^M char you can type <ctrl+v> <ctrl+m> for example if you like to search for it.
    – user986805
    Sep 27, 2020 at 5:23

1 Answer 1

3

After searching for a while, it turns out the issue is caused by the writing the script in Windows env and trying to run it in Linux env.

A super easy way to make it work is to use dos2unix (it can be easily installed by sudo apt install dos2unix)

cd into the folder where you have the code, then

dos2unit *.sh

then run the ./install.sh

Not the answer you're looking for? Browse other questions tagged .