Merge pull request #973 from RogueScholar/update-linux-install

Update Linux installation instructions
This commit is contained in:
LibretroAdmin 2024-08-19 11:55:33 -05:00 committed by GitHub
commit 5617359361
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,77 +1,204 @@
# Downloading, Installing and Updating RetroArch
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/kCyTlMjvzWA" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe allow="accelerometer; ambient-light-sensor; autoplay; clipboard-write;
display-capture; encrypted-media; execution-while-out-of-viewport; fullscreen;
geolocation; gyroscope; hid; magnetometer; picture-in-picture;
screen-wake-lock; speaker-selection; web-share;" aria-label="YouTube video"
height="315" loading="lazy" name="YouTube embedded player"
referrerpolicy="strict-origin-when-cross-origin" role="application"
sandbox="allow-orientation-lock; allow-presentation;"
src="https://www.youtube-nocookie.com/embed/kCyTlMjvzWA"
style="border-collapse: collapse; border-style: hidden; margin: 1rem auto;"
title="RetroArch - How to Install : Sega Genesis Mini" width="560"></iframe>
## GNU/Linux
### Flatpak
Flatpak is a distro-agnostic way to install RetroArch across many different GNU/Linux based operating systems. RetroArch currently resides in the FlatHub repository.
Flatpak is a distribution-agnostic packaging format with broad support
throughout the Linux ecosystem. An official
[RetroArch flatpak][retroarch-flatpak] is published in the Flathub repository,
and can be installed in just three easy steps:
First you should ensure that [Flatpak is installed](http://flatpak.org/getting.html). Once installed, open the terminal emulator that came with your distro, and run the following command to see how to use it:
#### Installation
```
flatpak --help
1. Ensure that Flatpak is [enabled on your system][flatpak-setup] by opening the
terminal and confirming that the following command exits with no errors:
```sh
flatpak --installations
```
1. Confirm that the Flathub repository is configured as a
[flatpak remote][flatpak-remote], so that packages may be installed from it.
You can examine the flatpak remotes currently enabled on your system with
this terminal command (shown with default output):
```console
$ flatpak remotes --columns=name,url,homepage
Name URL Homepage
flathub https://dl.flathub.org/repo/ https://flathub.org/
```
If Flathub is not among the remotes shown, this command will add it to your
system:
```sh
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
```
1. Finally, install the RetroArch Flatpak. You have the option of making it
available to only the current user, with this command:
```sh
flatpak install -y --user --from https://dl.flathub.org/repo/appstream/org.libretro.RetroArch.flatpakref
```
Or for all users with this command:
```sh
sudo flatpak install -y --from https://dl.flathub.org/repo/appstream/org.libretro.RetroArch.flatpakref
```
#### Launching the Flatpak
RetroArch should now be listed in your app launcher and can also be executed
from the terminal with the command:
```sh
flatpak run org.libretro.RetroArch
```
Next you should add the Flathub repository, so that it may download from it:
#### Updates
```
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
```
You should keep RetroArch updated by running this command periodically from the
terminal:
To install RetroArch execute:
```
flatpak install --user flathub org.libretro.RetroArch
```
To update you should periodically run
```
flatpak --user update
```sh
flatpak update -y --app org.libretro.RetroArch
```
### Ubuntu-based
The best way to get RetroArch and the corresponding libretro cores on to a Ubuntu-based system is using PPA.
If you're using Ubuntu, an official [Ubuntu flavor][ubuntu-flavors], or one of
the many Linux distributions based on Ubuntu (such as Linux Mint, Zorin OS, Pop!
OS, elementary OS, etc.), you can install RetroArch and many of the most popular
Libretro cores as native APT packages by simply enabling one (or both) of the
two official Libretro [Personal Package Archives (PPAs)][help-ppas] hosted on
[Launchpad](https://launchpad.net/~libretro), namely:
First open the terminal on Ubuntu. You now need to consider which branch you want to use, stable or testing? Stable will give you better stability at the cost of slower updates, while testing gives you the chance to try features early and get updates quicker.
- [**Stable**][ppa-stable] (recommended), which includes only official releases
(as announced on libretro.com / retroarch.com), and
- [**Testing**][ppa-testing], which provides nightly builds of RetroArch and
most Libretro cores that allow you to test new features as soon as they're
added.
To add the stable branch to your system type:
#### Installation
```
sudo add-apt-repository ppa:libretro/stable
In order to add PPAs to your system's package sources, some tools from the
official package repositories are needed. Open the terminal and run this command
to ensure they are installed:
```sh
sudo apt -y install software-properties-common
```
Or if you want the testing version:
One command is needed to add a PPA to your system's package sources. To add the
[**Stable PPA**][ppa-stable], use:
```
sudo add-apt-repository ppa:libretro/testing
```sh
sudo add-apt-repository -ysnP libretro/stable
```
You should now update the repositories:
Or to add the [**Testing PPA**][ppa-testing], use:
```
sudo apt-get update
```sh
sudo add-apt-repository -ysnP libretro/testing
```
And finally install RetroArch:
You can now install the RetroArch package from the PPAs with this command:
```
sudo apt-get install retroarch
```sh
sudo apt -Uy install retroarch
```
Updating will happen system-wide, to change frequency update checks, you should change this in Ubuntu's software updater settings.
You can verify that the PPA package was installed rather than the one from the
official distribution repositories with the `apt show` command (shown with
expected output for the Testing PPA package):
### Arch-based
Arch Linux provides [stable releases](https://www.archlinux.org/packages/community/x86_64/retroarch/) of RetroArch in their community repository.
Install with:
```console
$ apt show retroarch
Package: retroarch
Version: 1.19.1+r202408170734~bf25bd9149-179~ubuntu24.04.1
Priority: optional
Section: games
Maintainer: Libretro Team <libretro@gmail.com>
Original-Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org>
Installed-Size: 25.2 MB
Provides: retroarch-dbg
Depends: fonts-dejavu-core, libretro-core-info, libegl1, libgl1, […]
Recommends: libgamemode0, retroarch-assets
Suggests: xdg-utils
Download-Size: 6,349 kB
APT-Sources: https://ppa.launchpadcontent.net/libretro/testing/ubuntu […]
Description: Simple frontend for the libretro library
RetroArch is an open source, multi-platform frontend for the libretro API. It
can be used as a modular multi-emulator system, game engine, media player and
3-D technical demonstration. These features are available through libretro
cores.
.
It provides four built-in graphical user interface flavors: RGUI, XMB, Ozone
and GLUI.
Notice: There is 1 additional record. Please use the '-a' switch to see it
```
Look at the **`APT-Sources:`** line in the output. If one of the PPA packages is
installed, its value will begin with
`https://ppa.launchpadcontent.net/libretro/`.
#### Updates
With this installation method, RetroArch updates will automatically be included
with your systems regular package upgrades. However, you are always able to
trigger an update specifically for RetroArch with the terminal command:
```sh
sudo apt -y upgrade retroarch
```
### Arch Linux-based
Arch Linux provides a [`retroarch`][arch-package] package for x86_64 systems in
their official [Extra repository][arch-extra-repo]. You can install it by
searching for RetroArch by name in a graphical package manager like
[Octopi][octopi], or from the terminal with the command:
```sh
sudo pacman -S retroarch
```
A [git release](https://aur.archlinux.org/packages/retroarch-git) of RetroArch is also available on the [AUR](https://aur.archlinux.org/).
A "git" package named [`retroarch-git`][aur-git-package] which offers prerelease
builds (similar to the Testing PPA described above) is also available on the
[AUR][arch-aur]. As above, it can be installed from a package manager GUI or in
the terminal using an "[AUR helper][aur-helpers]" like [`yay`][aur-yay], as in:
```sh
yay retroarch-git
```
[arch-aur]: https://aur.archlinux.org/ "Arch User Repository (AUR)"
[arch-extra-repo]: https://wiki.archlinux.org/title/Official_repositories#extra
[arch-package]: https://archlinux.org/packages/extra/x86_64/retroarch/
[aur-git-package]: https://aur.archlinux.org/packages/retroarch-git
[aur-helpers]: https://wiki.archlinux.org/title/AUR_helpers
[aur-yay]: https://github.com/Jguer/yay
[flatpak-remote]: https://docs.flatpak.org/en/latest/flatpak-command-reference.html#flatpak-remotes
[flatpak-setup]: https://flatpak.org/setup/
[help-ppas]: https://help.launchpad.net/Packaging/PPA/InstallingSoftware
[octopi]: https://tintaescura.com/projects/octopi/
[ppa-stable]: https://launchpad.net/~libretro/+archive/ubuntu/stable
[ppa-testing]: https://launchpad.net/~libretro/+archive/ubuntu/testing
[retroarch-flatpak]: https://flathub.org/apps/org.libretro.RetroArch
[ubuntu-flavors]: https://ubuntu.com/desktop/flavours