On my Ubuntu, when I write some script (or using for example Composer) it returns me this error:
-bash: /usr/local/bin/composer: /usr/bin/env: bad interpreter: No such file or directory
This is an error with env php, but it's the same for env ruby or others.
I saw with ll
that the symlink of /usr/bin/env
, pointing to /bin/env
is broken (red text with black background), in fact /bin/env
doesn't exist.
I remember that I used composer many times (is a web server based on Ubuntu 16.04) and I didn't touch the server, weird.
If I run "env php" it tells me that env is not installed (?) and I can install it with apt install coreutils
, but obviously coreutils is installed.
Do you think I can solve this with reinstalling coreutils?
sudo apt-get install --reinstall coreutils
Is it dangerous? As I said, is a web server, I don't want to lose something or to have website offline.