Yesterday i was trying to run a .sh script on ubuntu 14 and i was getting this
/usr/bin/env: ‘bash\r’: No such file or directory
so i tried to fix it by running
sudo ln -snf /bin/env /usr/bin/env
That allowed me to run the sh script but not it broke all the the npm paths and i am not a linux guy so unsure how to fix it.
for npm or ng commands i get
-bash: /usr/bin/npm: /usr/bin/env: bad interpreter: No such file or directory
or
-bash: /usr/local/bin/ng: /usr/bin/env: bad interpreter: No such file or directory
i can see the error and there is no env file in /user/bin/env
It has effected everything, i cannot even start apache2
Failed to restart apaceh2.service: Unit apaceh2.service not found.
What should be there or how can i fix this? completely lost