Music – How to avoid parallel fifths and octaves?

Hi, i’d appreciate some help..

I don’t get how you can follow the rule of avoiding consecutive parallel fifths or octaves while abiding by doubling the root of certain chords, specifically, 2nd inversions.

for example, lets say the chords are G Major then A minor, both are inverted.

In G Major, 2nd inversion, D is the bass note, you would double the D.

But the next chord is A minor in second inversion (E is the bass note), so the E would be doubled, and you’d get consecutive octaves which breaks the rule.

How do you resolve this?

Popular: 5 Tips for Your Wedding Music
More: Best electronic drum set? Swift or Zombies, who's better? Band or artist with Zappa-esque satire? Does anyone know the band "the boxers" with Ian Edwards on vocals...they have a song called The Waitress? Where can I find an easy hymn piano sheet music of "Grace Unmeasured"?