Avrdude refuses to flash ATmega328p due to wrong signature
You need to put an external oscillator. I suppose that the fuses for those chips are programmed for a external oscillator. Once you can flash it with the external oscillator change the fuses so you can program it without an oscillator.