Saved searches
Use saved searches to filter your results more quickly
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
Installing on Linux
- Index
- Introduction
- Arch Linux build dependencies
- Build system
- Libraries. Dependencies may change in the future
- Using CMake
- Basic mode: straightforward compilation
- Expert mode: CMake build parameters
- Running CMake to generate the makefile:
- Do the compilation:
- Reporting CMake bugs
- Debugging
- Segmentation Faults
- Fedora
- OpenSUSE Tumbleweed
- Ubuntu PPA
- Add the x86 architecture to your package manager (x64 installs of 12.04 or newer only)
- Add the multiverse package repository
- Add the PCSX2 PPA to your software sources
- Daily Builds
- Install the package on your system
- Arch Linux
- Main repo
- Aur
- On to some outdated stuff!!##
- How to compile PCSX2 in 2021 (Ubuntu 20.04) (64bit)
- How to compile PCSX2 in 2021 (Fedora)
- How to compile PCSX2 in 2021 (Gentoo & Derivatives):
Clone this wiki locally
This is intended to give you an idea of how to compile PCSX2 from Git in Linux. Some of the steps may be different on some versions of Linux, and this is not generally supported by the PCSX2 team. If you have issues following this guide, I’d recommend going through this thread for help: https://forums.pcsx2.net/Thread-Linux-Compile-Guide-and-Support
Arch Linux build dependencies
Optionally, you can build with:
Libraries. Dependencies may change in the future
libaio libpng sdl2 soundtouch libx11 xz
Basic mode: straightforward compilation
Use one of the cmake presets: mkdir build && cd build && cmake —preset= .. and then either make -j or ninja , depending on the preset.
For gcc and make, use gcc-debug , gcc-devel , or gcc-release . For gcc and ninja, use gcc-debug-ninja , gcc-devel-ninja , or gcc-release-ninja . For clang, lld, and ninja, use clang-debug , clang-devel , or clang-release . This is currently the only lto preset.
Expert mode: CMake build parameters
- Use Release/Development/Debug : -DCMAKE_BUILD_TYPE=Release|Devel|Debug
- Release : Best in speed, but provides little or no debug/crash info.
- Devel : Adds detailed trace logging abilities, but still lacks debug/crash info.
- Debug : No compiler optimizations. Very good for debug/crash info but also very slow.
Expert parameters (not supported, the best is to use the default options):
- Tune C flags : -DUSER_CMAKE_C_FLAGS:STRING=»cflags»
- Tune C++ flags : -DUSER_CMAKE_CXX_FLAGS:STRING=»cxxflags»
- Tune linker flags : -DUSER_CMAKE_LD_FLAGS:STRING=»ldflags»
Expert debugging parameters (typical developer-only option):
Expert options for package creation:
- Enable package mode : follow the FHS for distribution -DPACKAGE_MODE=TRUE
- GameDB install path in package mode : -DGAMEINDEX_DIR=»/usr/share/games/pcsx2″
- Documentation install path in package mode : -DDOC_DIR=»/usr/share/doc/pcsx2″
- GLSL shader install directory : -DGLSL_SHADER_DIR=»/usr/share/games/pcsx2″
- Disable AVX: -DDISABLE_ADVANCE_SIMD=TRUE
- Enable/disable the stipping : -DCMAKE_BUILD_STRIP=TRUE|FALSE
- TRUE : Remove debugging information.
- FALSE : Keep symbols. Better for debug. (recommended since it should not have any impact on speed)
Running CMake to generate the makefile:
It is advised to use a build method that places build files outside the PCSX2 sources directory, as it makes it easier to delete all CMake build files:
mkdir build && cd build cmake ..
or, if you are a ninja, or at least using ninja:
Not all distributions and configurations were tested. In case you encounter a CMake bug that is really a CMake issue, you can report it. Please provide the following information:
- Linux distribution, the current kernel version, and architecture (32-bit or 64-bit)
- The CMake commands. For example: cmake CMakeLists.txt
- All of CMake’s output. Something like this is good:
-- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Found GTK2_GTK: /usr/lib/libgtk-x11-2.0.so -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found -- Looking for IceConnectionNumber in ICE -- Looking for IceConnectionNumber in ICE - found -- Found X11: /usr/lib/libX11.so -- Found ALSA: /usr/lib/libasound.so -- Found BZip2: /usr/lib/libbz2.so -- Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so -- Looking for BZ2_bzCompressInit in /usr/lib/libbz2.so - found -- Looking for include files CMAKE_HAVE_PTHREAD_H -- Looking for include files CMAKE_HAVE_PTHREAD_H - found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found wxWidgets: TRUE -- Found ZLIB: /usr/lib/libz.so -- Found Cg: /usr/lib/libCg.so;/usr/lib/libCgGL.so -- Found PortAudio: /usr/lib/libportaudio.so -- Found SoundTouch: /usr/lib/libSoundTouch.so -- Configuring done -- Generating done -- Build files have been written to: /mnt/playstation/emulateur/package/pcsx2.snapshot-4810
It can be helpful to run PCSX2 under GDB in order to set breakpoints and debug crashes.
To enable debugging with symbol names:
- Run build.sh with the —debug option (not —devel or —release ).
- Ensure the —strip option is not enabled.
- Consider enabling other build.sh flags as described above if they are useful for your debugging.
The built executable can then be debugged using gdb ./bin/PCSX2 . Make sure you configure your plugin paths correctly within the PCSX2 GUI if you’re making changes to plugins!
Segmentation faults ( SIGSEGV ) are expected when running recompiled code such as a game in PCSX2. When a segmentation fault occurs, use bt and check if the backtrace contains recExecute . If it does then continue execution using c .
Additionally, segfault printing can be disabled entirely in GDB using the command handle SIGSEGV noprint .
Then install PCSX2 by terminal command:
Just add the Emulators repo and install pcsx2
sudo su - # (become root) zypper ar http://download.opensuse.org/repositories/Emulators/openSUSE_Tumbleweed/Emulators.repo zypper ref zypper in pcsx2
With multiarch functionality, you can install a 32-bit PPA on a 64-bit Ubuntu. You need at least Ubuntu 12.04 (Precise) to do this.
Add the x86 architecture to your package manager (x64 installs of 12.04 or newer only)
WARNING, ONLY DO THIS IF ON THE x86_64/AMD64 or x86/i386 ARCHITECTURES
dpkg —print-architecture should return amd64 or i386 , otherwise this will NOT work and likely break your install
You have been warned!sudo dpkg --add-architecture i386
Add the multiverse package repository
Uncomment lines looking like this, where trusty is replaced by your Ubuntu version
deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ trusty multiverse deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
Add the PCSX2 PPA to your software sources
sudo add-apt-repository ppa:gregory-hainaut/pcsx2.official.ppa sudo apt-get update
We also have a PPA with the daily builds of pcsx2-unstable if you prefer the bleeding edge.
sudo add-apt-repository ppa:pcsx2-team/pcsx2-daily sudo apt-get update
Install the package on your system
To install the latest stable release:
sudo apt-get install pcsx2
To install a newer, development version:
sudo apt-get install pcsx2-unstable
Note that pcap functionality will be enabled on AUR for netplay use.
Clone the AUR package, then cd to the correct folder, make and install the package:
git clone https://aur.archlinux.org/pcsx2-git.git cd pcsx2-git makepkg -csi
This will build the package, automatically installing all dependencies. It will then prompt for your password to install the package with pacman.
Alternatively use an AUR helper like yay or paru
On to some outdated stuff!!##
Note, it is 2023, not 2021. Both 2021 sets of instructions are outdated, as they are for wx builds. Leaving until they can be properly updated to qt 6, as most of the list of dependencies should be useful.
For Ubuntu 22.04+, I’d suggest: apt install qt6-base-dev qt6-base-private-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools
For 20.04, probably this: sudo add-apt-repository ppa:okirby/qt6-backports sudo apt-get update apt install qt6-base-dev qt6-base-private-dev qt6-tools-dev qt6-tools-dev-tools qt6-l10n-tools
And Fedora’d be something like: yum install qt6-qtbase-devel qt6-qtbase-private-devel qt6-qttools-devel
All of those worked at some point, but haven’t been tested recently.
How to compile PCSX2 in 2021 (Ubuntu 20.04) (64bit)
Note: For Ubuntu 21.10 (and probably the next LTS 22.04) libllvm10 is no longer in the packages list. Installing llvm 14 from https://apt.llvm.org/ seems to work.
sudo apt remove gcc-9 g++-9 sudo apt install cmake g++-10-multilib libaio-dev libasound2-dev libcairo2-dev libegl-dev \ libegl1-mesa-dev libgdk-pixbuf2.0-dev libgirepository-1.0-1 libgl-dev libgl1-mesa-dev \ libgl1-mesa-dri libgles-dev libgles-dev libgles2-mesa-dev libglib2.0-dev libglu1-mesa-dev \ libglu1-mesa libglvnd-dev libglx-dev libglx-mesa0 libglx0 libgtk-3-dev libgtk2.0-dev \ libharfbuzz-dev liblzma-dev libpango1.0-dev libpcap0.8-dev libpulse-dev \ libsdl2-dev libsamplerate0-dev libsoundtouch-dev libwxgtk3.0-gtk3-0v5 libwxgtk3.0-gtk3-dev \ libx11-xcb-dev libxext-dev libxft-dev libxml2-dev portaudio19-dev zlib1g-dev libllvm10 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10 sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 git clone https://github.com/PCSX2/pcsx2.git mkdir pcsx2/build && cd pcsx2/build git submodule update --init --recursive cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_REPLAY_LOADERS=TRUE -DCMAKE_BUILD_PO=FALSE -DDISABLE_SETCAP=TRUE .. make -j$(nproc) make install cd ../bin ./pcsx2
How to compile PCSX2 in 2021 (Fedora)
How to compile PCSX2 in 2021 (Gentoo & Derivatives):
sudo emerge -av net-libs/libpcap x11-libs/wxGTK media-libs/libsoundtouch dev-libs/libaio \ media-libs/libsdl2 app-arch/lzma net-libs/libpcap dev-libs/libxml2 git clone https://github.com/PCSX2/pcsx2.git mkdir pcsx2/build && cd pcsx2/build git submodule update --init --recursive cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_REPLAY_LOADERS=TRUE -DCMAKE_BUILD_PO=FALSE -DGTK3_API=TRUE \ -DwxWidgets_CONFIG_EXECUTABLE="/usr/lib64/wx/config/gtk3-unicode-3.0-gtk3" \ -DPACKAGE_MODE=TRUE -DCMAKE_INSTALL_PREFIX=/usr .. make -j$(nproc) make install cd ../bin