How to Install Xvfb on RHEL 6.2 via YUM: Resolving “No Package Xvfb Available” Error


2 views

When attempting to install Xvfb (X Virtual Frame Buffer) on RHEL 6.2 using YUM, you might encounter the frustrating "No package Xvfb available" error. This typically occurs when the required repositories aren't properly configured in your system.

First, let's verify which repositories are currently enabled on your system:

yum repolist enabled

For RHEL systems, you should see standard repositories like rhel-6-server-rpms. If you only have redhat.repo and rhel-source.repo, you'll need to enable additional channels.

Xvfb is actually part of a larger package group. The correct package name is:

xorg-x11-server-Xvfb

Not just Xvfb as you might initially expect.

For RHEL systems, you'll need to enable the following repositories:

rhel-6-server-rpms
rhel-6-server-optional-rpms
rhel-6-server-supplementary-rpms

You can enable them using:

subscription-manager repos --enable=rhel-6-server-optional-rpms
subscription-manager repos --enable=rhel-6-server-supplementary-rpms

With the proper repositories enabled, install Xvfb with:

yum install xorg-x11-server-Xvfb

After installation, verify it works by running:

Xvfb :1 -screen 0 1024x768x24 &

Then check if it's running:

ps aux | grep Xvfb

If you still face issues, consider adding the EPEL repository:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
yum install xorg-x11-server-Xvfb

Here's an example of running Firefox headless with Xvfb:

Xvfb :99 -screen 0 1024x768x24 &
export DISPLAY=:99
firefox &

If you encounter permission issues, try running as root or check your Xauth settings. For SELinux-related problems, you might need to adjust policies or run in permissive mode temporarily.


When trying to install Xvfb (X Virtual Frame Buffer) on RHEL 6.2 using YUM, you might encounter the frustrating "No package Xvfb available" error. This typically occurs when the required repositories aren't properly configured in your system.

First, it's important to know that the package isn't simply called "Xvfb". The correct package name is:

xorg-x11-server-Xvfb

To see what repositories you currently have enabled, run:

yum repolist

For RHEL systems, you'll typically need to enable the right channels. The package should be available in the standard RHEL repositories if they're properly configured.

If you're missing the necessary repositories, you'll need to enable them. For RHEL 6.2, try:

subscription-manager repos --enable=rhel-6-server-optional-rpms
subscription-manager repos --enable=rhel-6-server-extras-rpms

Once the repositories are properly configured, install Xvfb with:

yum install xorg-x11-server-Xvfb

After installation, verify it works by running:

Xvfb :1 -screen 0 1024x768x24 &

Then check if it's running:

ps aux | grep Xvfb

If you still can't find the package, consider adding the EPEL repository:

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
yum install xorg-x11-server-Xvfb
  • Make sure your system is registered with Red Hat Network
  • Check that your subscription includes access to the required channels
  • Verify there are no network issues preventing access to repositories

For development environments, you might want to automatically start Xvfb. Create a simple init script:

#!/bin/bash
# /etc/init.d/xvfb
case "$1" in
  start)
    /usr/bin/Xvfb :1 -screen 0 1024x768x24 &
    ;;
  stop)
    killall Xvfb
    ;;
  *)
    echo "Usage: $0 {start|stop}"
    exit 1
esac
exit 0