Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

tr: command not found

Writer Sophia Terry

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.

0

1 Answer

tr is contained in the coreutils package, but if this package was installed before a simple apt install will not restore it. To reinstall the package use apt-get’s --reinstall option:

sudo apt install --reinstall coreutils

If you didn’t (re)move the missing binary /usr/bin/tr there might be something wrong with your system, run fsck on the partition for a filesystem check and (if necessary) repair.

0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy