Skip to content
Search Fedora

    Browse this documentation

    Installing multiple versions of PHP / Java / Node / Python on Fedora

    “I need Node 24, plus PHP 8.3, plus Java 21” — on Fedora those four languages are supported very differently, and applying one mental model to all of them runs into walls.

    The summary first, then each case.

    LanguageF45 repositoriesParallel versionsRecommended
    Node.jsnodejs(22), nodejs22, nodejs24, nodejs26yes, nativednf install nodejs24 nodejs26
    Javaonly java-25-openjdknocontainers / SDKMAN / upstream tarball
    PHPonly php 8.5nocontainers
    Pythononly python3 3.15novenv / uv / pyenv / containers

    Node.js: the only one with native parallel installs

    Section titled “Node.js: the only one with native parallel installs”
    Terminal window
    sudo dnf install nodejs24 nodejs26
    Terminal window
    node -v # v22.23.1
    node-24 -v # v24.18.0
    node-26 -v # v26.3.1

    The binaries carry version suffixes and do not collide:

    /usr/bin/node /usr/bin/node-22 /usr/bin/node-24 /usr/bin/node-26

    npm mirrors that: npm, npm-22, npm-24, npm-26.

    This is the cheapest multi-version story on Fedora: no shell initialisation involved, so node-24 works in systemd units and CI scripts too.

    Details in installing Node.js.

    Java: only 25, older versions come from outside

    Section titled “Java: only 25, older versions come from outside”
    Terminal window
    dnf list --available 'java-*-openjdk.x86_64'
    java-25-openjdk.x86_64 1:25.0.4.1.1-1.1.fc45
    java-latest-openjdk.x86_64 1:27.0.0.0.35-0.0.1.0.ea.fc45

    No 21, no 17. Three routes exist:

    Terminal window
    # 1. containers
    podman run --rm eclipse-temurin:21-jdk java -version
    # 2. upstream tarball
    mkdir -p ~/jdk && cd ~/jdk
    curl -LO https://github.com/adoptium/temurin21-binaries/releases/latest/download/OpenJDK21U-jdk_x64_linux_hotspot.tar.gz
    tar xzf OpenJDK21U-jdk_x64_linux_hotspot.tar.gz
    # 3. SDKMAN (dev machines, frequent switching)
    curl -s "https://get.sdkman.io" | bash
    source ~/.sdkman/bin/sdkman-init.sh
    sdk install java 21.0.5-tem

    Details in installing Java.

    PHP: Remi does not provide versioned repos for Fedora

    Section titled “PHP: Remi does not provide versioned repos for Fedora”

    This is the most common misunderstanding. Remi has remi-php81…remi-php85 for EL, but Fedora 45 carries only one base remi repository:

    Terminal window
    curl -sL https://rpms.remirepo.net/fedora/45/ | grep -oE 'href="remi[^"]*"'
    href="remi/x86_64/"

    Paths like remi-php83/x86_64/ return 404. So:

    • Remi’s Fedora repository provides extensions and updates (patches newer than the distribution), not multiple PHP versions
    • Running PHP 8.3 and 8.5 side by side on Fedora means containers
    Terminal window
    podman run -d --name php83 -p 8083:80 php:8.3-apache
    podman run -d --name php84 -p 8084:80 php:8.4-apache
    curl -s http://127.0.0.1:8083/ | head -3

    Each version keeps its own port, configuration and extensions. In production an nginx can route sites to different containers.

    Python: versioned packages exist, just not under the plain name

    Section titled “Python: versioned packages exist, just not under the plain name”
    Terminal window
    dnf list --available 'python3.1*'
    python3.13.x86_64 3.13.15 fedora
    python3.14.x86_64 3.14.7 fedora

    Install them and the interpreters coexist:

    Terminal window
    sudo dnf install python3.13 python3.14
    $ python3.13 --version
    Python 3.13.15
    $ python3.14 --version
    Python 3.14.7
    $ python3 --version
    Python 3.15.0rc1

    All three live side by side as /usr/bin/python3.13, /usr/bin/python3.14 and /usr/bin/python3.

    Note that each versioned package ships only its own interpreter entry (28.7 KiB for python3.14); third-party libraries still go into that version’s own venv, not a shared system site-packages.

    But most “I need another Python version” requests really mean dependency isolation, which venv handles:

    Terminal window
    python3 -m venv ~/proj/.venv
    source ~/proj/.venv/bin/activate
    pip install -r requirements.txt

    When the interpreter genuinely has to differ (a library that only supports 3.12):

    Terminal window
    # uv: install and manage several interpreters
    curl -LsSf https://astral.sh/uv/install.sh | sh
    uv python install 3.12 3.13
    uv python list
    uv venv --python 3.12
    Terminal window
    # or pyenv
    curl https://pyenv.run | bash
    pyenv install 3.12.7
    pyenv global 3.12.7
    Your situationUse
    Node 22/24/26dnf install nodejs24 nodejs26, call node-24
    Node 16/18 or an exact patch releasenvm or containers
    Java 21/17containers first; tarball or SDKMAN when the host needs it
    PHP 8.3 and 8.5 side by sidecontainers, two ports
    Dependency isolation onlyvenv
    A different Python interpreteruv or pyenv
    Pinned versions in CIcontainer images, not the host

    Fedora’s model is one supported upstream version per release: the repositories package the currently supported majors, which keeps security updates straightforward and avoids maintaining several ABIs.

    Multi-version mechanisms live in the EL world (Application Streams, Remi’s versioned repositories) because those need to support a ten-year lifecycle. So on Fedora the default answer to “I need another version” is a container, not a third-party repository.