Managing Parallel Language Runtimes in AlmaLinux with AppStreams
Stop fighting dependency hell. Learn how to use AlmaLinux AppStreams to manage multiple versions of runtimes like Node.js and PHP without breaking your OS.
11 Aug 2025, 05:58 UTC

The Version Conflict Dilemma
Engineering teams often face a conflict when a server must support a legacy application requiring an older runtime like PHP 7.4 while simultaneously hosting a new service that demands a modern version like PHP 8.1. In traditional Linux distributions, installing multiple versions of the same package often leads to dependency hell or requires manual compilation from source, which bypasses the security updates provided by the OS vendor.
The solution in AlmaLinux is the AppStream system. Instead of treating a package as a single static version, AppStream uses Modules to group different versions of the same software into streams. This allows you to select a specific version of a runtime without upgrading the entire operating system or breaking other system dependencies.
How AppStreams Decouple Application and OS Lifecycles
Historically, the operating system's release cycle dictated the version of the software available. If the OS was released in 2021, you were stuck with 2021-era software until the next major OS upgrade. AppStreams break this link.
A module is a collection of RPMs that are logically grouped. A stream is a specific version of that module. For example, the nodejs module might have streams for version 14, 16, and 18. You can switch between these streams using the dnf package manager, ensuring that the application lifecycle moves faster than the OS lifecycle.
Working Example: Switching Node.js Streams
To manage these versions, you use the dnf module command. This must be run with root or sudo privileges on the AlmaLinux terminal.
Identify Available Streams
First, check which versions of the software are available in the official repositories:
sudo dnf module list nodejsExpected Check: The output will display a table showing the stream name, the status, and the profile.
Enable and Install a Specific Version
If you need Node.js 18 specifically, you must first reset any existing module selections and then enable the desired stream:
sudo dnf module reset nodejs
sudo dnf module enable nodejs:18
sudo dnf install nodejsRisk: Running dnf module reset removes the current stream selection but does not necessarily uninstall the packages. Always verify the active version after installation.
Verify the Result
Confirm the installation was successful and the correct version is active:
node -vTrade-offs and Limitations
While AppStreams provide flexibility, they are not a complete replacement for containerization like Docker or version managers like nvm or pyenv. There are two primary limitations to keep in mind:
- Single Active Stream: You cannot have two different streams of the same module active simultaneously in the global system path. If you enable Node.js 18, it replaces Node.js 16. To run both at the same time on one machine, you must use containers.
- Third-Party Repository Conflicts: If you use the EPEL repository, some packages may have dependencies that conflict with a specific AppStream version. Always check for dependency errors during the dnf install phase.
Practical Verification
To ensure your AlmaLinux environment is behaving as expected, you can run dnf module list --installed. This will show you exactly which streams are currently active on your system, preventing silent version upgrades during a general dnf update.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.