The only free and comprehensive online etymological dictionary of the Spanish language
capra f. (Noun) "goat"
From Latin capra "she-goat." From Proto-Italic *kapra- 'id.' Likely a loan from a non-Indo-European language.
Indo-European
Romance
Asturian cabra, Portuguese cabra, Galician cabra, Catalan cabra, French chèvre, Italian capra, Aromanian caprã, Romanian capră, Sardinian craba
Italic
Umbrian kaprum
Celtic
Gaulish gabrus, Old Irish caera "sheep" (from *kapera-), gabor, Middle Welsh gauar, Old Breton gabr, Old Cornish gauar
Germanic
Old Norse hafr, Old English hæfer
Hellenic
Ancient Greek κάπρος (kápros) "boar"
Indo-Iranian
Sanskrit kápṛth (?) "penis"

Note the variation between *ka- and *ga- in Celtic (cf. Old Irish caera "sheep" and gabor "roebuck"). Additionally, note the variation between *-b- in Celtic and *-p- in Greek and Latin. There is no way to explain the interchange between *ka- ~ *ga- and *-p- and *-b- from within Indo-European. The words must come from a non-Indo-European source or sources.