can but not very successful....bacteria are more complicated and they have antigen variation to make a shift into another form,
however, there are vaccines under developement, targeting on the more conserved antigenic part of a bacteria, or even an eukayotic system, or a parasite, or other ways of antigen presenting, such as DNA vaccine, but till today they are still in laboratory developement.......
for bacteria, the more successfully story was the antibiotics....
but there are some successful vaccines for bacteria infections, such as the one against tuberosus.....
since the word vaccine is derived from vaccinia, which is a virus.....
tuberculosis, correction