Not sure which system you're on, and which installation method you're using, but I'm on macOS, and I'm using Homebrew, and sometimes permissions get messed up:
brew is without sudo, but other installations (not via Homebrew) into /usr/local can chown the directory to the system default root, e.g. ClamXAV (at least earlier versions). In these cases I'm running
sudo chown $(id -un):admin /usr/local, and installations into /usr/local (incl. /usr/local/bin) work again. Sometimes you read that you should chown recursively, i.e.
sudo chown -R $(id -un):admin /usr/local, but I found out that this is not necessary. You should definitely not chown recursively, if you've installed security software in there, like the afore-mentioned ClamXAV. You wouldn't want userspace processes having read/write access to your anti-virus definitions.