grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist.

This is a wiki page. Be bold and improve it!

If you have any questions about the content on this page, don't hesitate to open a new ticket and we'll do our best to assist you.

Error, as found on a BIOS/GPT system:

# grub-install /dev/sda
grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.

Further confused by:

# ls -d /usr/lib/grub/x86_64-emu/
/usr/lib/grub/x86_64-emu/
# grub-install /dev/sda  --directory=/usr/lib/grub/x86_64-emu --target=i386-pc
grub-install: error: Unknown platform `x86_64-emu'.

Solution:
On a BIOS Gentoo system, it is not necessary to set the GRUB_PLATFORMS in /etc/portage/make.conf.
Remove GRUB_PLATFORMS, and emerge grub again:

# emerge --ask --newuse --deep sys-boot/grub:2
...
[ebuild   R    ] sys-boot/grub-2.02_beta3-r1  GRUB_PLATFORMS="efi-64* pc* -emu*"
...

Then:
# grub-install     /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.