I copied this method from another site and it worked for me.
==============
RETROPIE ATTRACT MODE UPDATE
Well first I would update retroarch files. You can do this from the RetroPie-Setup menu. After that is complete, reboot, then either drop to the command line (F4), or, if you do not have a keyboard connected, quit emulationstation from the menu, then ssh into the pi from a pc or laptop. I use putty as I'm on windows, but any ssh capable app will do.
At the command do the following in order, pressing ENTER after each line and waiting until the prompt appears again before entering the next line.(Note: commands are case sensitive in Linux)
cd ~
rm -r -f develop
mkdir develop
cd develop
git clone --depth 1
https://github.com/mickelson/attract attract
cd attract
make USE_GLES=1 -j4
sudo make install
cd ~
rm -r -f develop
sudo shutdown -r now
The last line will reboot your system and boot back into emulationstation, or a prompt, depending on your previous image. Either way, you have to get back to the prompt and type: attract
This will get you into your now updated AM.
Hope this helps.
==============
RussM