0

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

Logon
  • 53
  • 1
  • 1
  • 8
  • "ubuntu 14" — Ubuntu version numbers take the form of `yy.mm` where `yy` is a two digit year and `xx` is a two digit month of release. There is no "ubuntu 14" – Quentin Jul 18 '18 at 15:18

1 Answers1

0
  1. You should check if Node.js installed on your ubuntu machine correctly.

  2. You should install node-gyp before install Angular cli.

    $ sudo npm install -g node-gyp
    $ sudo npm install -g @angular/cli
    
Ihor
  • 53
  • 8
  • running npm is the issue it gives -bash: /usr/bin/npm: /usr/bin/env: bad interpreter: No such file or directory – Logon Jul 18 '18 at 16:05
  • I don't feel this is a duplicate as the previous questions relate to windows. – Logon Jul 18 '18 at 16:19