I'm using Ubuntu 18.04, and recently I keep getting this error when running bash scripts: tr: command not found
. The tr
does not exists in /usr/bin
and /usr/sbin
. Also installed coreutils
but still no luck. How can I add this command to my shell?
which tr
returns nothing. This is what apt says about coreutils
:
coreutils is already the newest version (8.28-1ubuntu1).
I get Command 'tr' not found
so nothing is overriding it. /usr/bin
is in my PATH
variable.
tr
is contained in thecoreutils
package, but if this package was installed before a simpleapt install
will not restore it. To reinstall the package useapt-get
’s--reinstall
option:If you didn’t (re)move the missing binary
/usr/bin/tr
there might be something wrong with your system, runfsck
on the partition for a filesystem check and (if necessary) repair.