Home » RetroPie Project » RetroPie-Setup: An initialization script for RetroArch on the Raspberry Pi

RetroPie-Setup: An initialization script for RetroArch on the Raspberry Pi

If you want to install and setup RetroArch on the Raspberry Pi (TM) together with various emulator cores, all needed libraries for the SNESDev controller interface, and a graphical front end you can now go to https://github.com/retropie/RetroPie-Setup. There you will find an easy-to-use script that installs all essential packages for retro gaming on the Raspberry. I call it RetroPie script.

I prepared a Github repository with a shell script that automatically installs all needed packages. It has a console-based GUI and makes the installation of everything you need for retro gaming very easy. The script was tested on the Raspbian distribution. The following instructions can also be found directly on the Github site.


To obtain the installation script you first need to install two packages with

sudo apt-get update
sudo apt-get install -y git dialog

Then you can download the latest RetroPie setup script with

git clone git://github.com/petrockblog/RetroPie-Setup.git


The script is executed with

cd RetroPie-Setup
chmod +x retropie_setup.sh
sudo ./retropie_setup.sh

You are welcomed with the following screen

Here, you have the choice between two different ways of installation:

  1. Binaries-based installation: This way of installation will download per-compiled versions of RetroArch, various cores, Emulation Station, and SNESDev. In comparison to the second way of installation this is much faster. Even though the binaries will be updated from time to time, a disadvantage is that you probably will not have the most recent versions of the programs.
  2. Source-code based installation: This way of installation will download and compile the most recentsources of all programs and cores. Compiling everything takes some hours, but you will have the most up-to-date releases of the programs. When you choose this option in the menu a screen will appear that lets you select (with the space and arrow keys) the individual tasks to be done by the setup script:

    The default selection will install the complete set of packages.


With it’s default configuration the RetroPie setup configures the graphical front end EmulationStation such that a set of emulators can directly be used by the front end. You can start the front end with


Before that, however, you need to copy your ROM files into the according RetroPie/roms/ folders. Every emulator has its own subfolder here. Due to the early stage of the ALSA implementation on the Raspberry you can expect some creaking when using the analog output. I made quite good experiences with the HDMI output. For now, another solution for that seems to be the use of an external USB soundcard until the problems with the ALSA implementation are solved.

I really would like to see this script be further developed by you and me!! I think that Github is the right place for that.


Check Also

Xarcade2Jstick supports new Tri-Mode Tanksticks

X-Arcade Dual Joystick If you happen to own an X-Arcade Tankstick this post might be …


  1. Adriaan Verhelst

    i got stuck here someone please help

    Getting sources for ‘lr-glupen64’ : N64 emu – GLupeN64 for libretro
    = = = = = = = = = = = = = = = = = = = = =

    git clone –recursive –depth 1 “https://github.com/loganmc10/GLupeN64.git” “/home/pi/RetroPie-Setup/tmp/build/lr-glupen64”
    Cloning into ‘/home/pi/RetroPie-Setup/tmp/build/lr-glupen64’…
    Username for ‘https://github.com’:

  2. It broke my rpis os i tried running it and it gave me the lxde error so i logged out and signed back in and it rebooted and gave me a root mount error

  3. This isn’t in the actual instructions above I don’t think, but can someone tell me how to add roms. I format the USB (FAT32) and plug in and enable USB ROM SERVICE before plugging in, but after waiting about 5 minutes, I plug into my computer and no new folders have been added. Can someone help please.

  4. Matteo Pio Muscat

    Can you make this for Ubuntu Mate for the Raspberry Pi 3 and 2 please as I don’t want to have Berryboot. I just want to use a simple OS for all of my stuff including retro gaming and normal desktop uses.

  5. I’ve installed the script and told it to run the binary based installation, but for the past hour all I see on my ssh session is it trying to get http://archive.raspberrpi.org/debian/jessie/main wolfram-engine armhf 10.3.1+2016012407. There’s a number in front of it that keeps increasing. It’s currently at 381. Is this what it’s supposed to do?

  6. Hey I have a problem (I don’t know if it was mentioned before) For almost every ROM that I load up, it goes to terminal for like a second and then switches back into emulation station, not having started the game

  7. great job you’ve done there mate, much respect. so if i just want n64, what steps would I want to take? Must have been an update, I have more than just the binary and source code options in the beginning when i start the setup script.

  8. Karasu-o-matic

    updating from jessie and installing the binaries everything goes smooth though at the end of it reports an error about some libraries (libsdl and another can’t remember now) Thanks for the effort though, really appreciate it!

  9. Hey thanks for the awesome writeup. I wanted to ask, I noticed not all emulators show up in my list. Will they show when I add ROMS to their respective folders or will I have to add the bios for said emulators for them to show?

  10. I am having a problem getting the games to start , EMUSTAT runs fine i select emulator , then a game and the screens goes black with a command select says hit x or n key to select defaults so i select the desired defaults (tried all ) no matter what it kicks me back to emu game select screen like rom doesnt load or something

  11. Hi !

    Lovely project !

    My Pi 2 arrived 2 days ago, and yesterday i installed Raspbian by a NOOBS image, installed some programs, and then installed Retropie by using the script.

    As i wanted some performance, i left it compiling at night, but today i was presented with some errors at the end, saying couldn’t compile thing like scummvm, gbasp, and couldn’t install some libs like libsdl-ttf2.0-dev , libsdl-mixer1.2-dev , libsdl-image1.2-dev , libsdl-gfx1.2-dev , libxaw7-dev, checkinstall…. What you recommend me to do in order to make a complete sucessfull install from the sources ?
    Anything i could see in the error logs ?

  12. Sorry if this has already been asked. Are these instructions the same for a Raspberry Pi 2? Im just wondering if a different build is needed to use the extra cores and ram?

  13. I installed everything okay. I’m able to run the EmulationStation and launch the free games included. But, no sound. I’ve tried one of my own ROMs and same thing. I ensured the sound was configured in EmulationStation. I tried forcing the sound via my HDMI in raspi-config and same thing. Probably something simple I’m overlooking. Anyone have suggestions?

  14. James Rubinstein

    Can you use this install script with openelec? It doesn’t have sudo, apt, or git 🙁

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

We use Cookies and similar technology to collect and analyse information about the users of this website. We use this information to enhance the content, advertising and other services available on the site. Please click ‘Accept cookies’ to consent to the use of this technology by petrockblock. You can manage your preferences at any time by visiting our Cookies Policy page.