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.
At a glance
Section titled “At a glance”| Language | F45 repositories | Parallel versions | Recommended |
|---|---|---|---|
| Node.js | nodejs(22), nodejs22, nodejs24, nodejs26 | yes, native | dnf install nodejs24 nodejs26 |
| Java | only java-25-openjdk | no | containers / SDKMAN / upstream tarball |
| PHP | only php 8.5 | no | containers |
| Python | only python3 3.15 | no | venv / uv / pyenv / containers |
Node.js: the only one with native parallel installs
Section titled “Node.js: the only one with native parallel installs”sudo dnf install nodejs24 nodejs26node -v # v22.23.1node-24 -v # v24.18.0node-26 -v # v26.3.1The binaries carry version suffixes and do not collide:
/usr/bin/node /usr/bin/node-22 /usr/bin/node-24 /usr/bin/node-26npm 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”dnf list --available 'java-*-openjdk.x86_64'java-25-openjdk.x86_64 1:25.0.4.1.1-1.1.fc45java-latest-openjdk.x86_64 1:27.0.0.0.35-0.0.1.0.ea.fc45No 21, no 17. Three routes exist:
# 1. containerspodman run --rm eclipse-temurin:21-jdk java -version
# 2. upstream tarballmkdir -p ~/jdk && cd ~/jdkcurl -LO https://github.com/adoptium/temurin21-binaries/releases/latest/download/OpenJDK21U-jdk_x64_linux_hotspot.tar.gztar xzf OpenJDK21U-jdk_x64_linux_hotspot.tar.gz
# 3. SDKMAN (dev machines, frequent switching)curl -s "https://get.sdkman.io" | bashsource ~/.sdkman/bin/sdkman-init.shsdk install java 21.0.5-temDetails 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:
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
podman run -d --name php83 -p 8083:80 php:8.3-apachepodman run -d --name php84 -p 8084:80 php:8.4-apachecurl -s http://127.0.0.1:8083/ | head -3Each 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”dnf list --available 'python3.1*'python3.13.x86_64 3.13.15 fedorapython3.14.x86_64 3.14.7 fedoraInstall them and the interpreters coexist:
sudo dnf install python3.13 python3.14$ python3.13 --versionPython 3.13.15$ python3.14 --versionPython 3.14.7$ python3 --versionPython 3.15.0rc1All 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:
python3 -m venv ~/proj/.venvsource ~/proj/.venv/bin/activatepip install -r requirements.txtWhen the interpreter genuinely has to differ (a library that only supports 3.12):
# uv: install and manage several interpreterscurl -LsSf https://astral.sh/uv/install.sh | shuv python install 3.12 3.13uv python listuv venv --python 3.12# or pyenvcurl https://pyenv.run | bashpyenv install 3.12.7pyenv global 3.12.7Decision table
Section titled “Decision table”| Your situation | Use |
|---|---|
| Node 22/24/26 | dnf install nodejs24 nodejs26, call node-24 |
| Node 16/18 or an exact patch release | nvm or containers |
| Java 21/17 | containers first; tarball or SDKMAN when the host needs it |
| PHP 8.3 and 8.5 side by side | containers, two ports |
| Dependency isolation only | venv |
| A different Python interpreter | uv or pyenv |
| Pinned versions in CI | container images, not the host |
Why Fedora does not ship everything
Section titled “Why Fedora does not ship everything”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.
Related pages
Section titled “Related pages”- Installing Node.js — versioned packages and the npm global prefix
- Installing Java — only 25, three routes for older
- Installing PHP — php-fpm and web servers
- Containers and rootless — running another version in a container
- Toolchain and multiple versions — the overall strategy
- Domestic mirrors — mirrors for language ecosystems and container images