A gun's too much hassle
Its too difficult to aim. Its much more cost effective to use an inexpensive drone with an explosive warhead. Aerovirenment has a rather nifty one that's stored in and launched from a tube. Once its targeted it can lurk around until it sees what its been told to destroy whereupon it dives on the target, detonates and kills it.
(For those who really must use a gun we have the old, reliable A10. OK, its got someone driving it but I daresay it could be made remotely pilotable if necessary.)