I had this same problem. After a lot of hair-pulling I figured out that you shouldn’t try to install Avast while in Safe MOde.