When your Gentoo stuff is broken, try researching these:
List of magic Gentoo commands:
- revdep-rebuild
- lafilefixer
- python-updater
- perl-cleaner
Better known Gentoo commands:
- emerge
- etc-update
- genkernel
- eselect
- equery
Not sure how well known these commands are:
- gcc-config