mojave21
My understanding is that happens when you catch the repository while its re-indexing. Which is why if you try it again a little later it is fine.
I suggest searching for broken packages and reinstalling any that are found with this command (Note its case sensitive).
sudo eopkg check | grep Broken | awk '{print $4}' | xargs sudo eopkg it --reinstall