如何在RH8上安装Xvfb?

How to install Xvfb on RH8?

我需要在 Redhat 8 上安装 Xvfb,但是通常的方法不起作用:

yum -y install xorg-x11-server-Xvfb

No match for argument: xorg-x11-server-Xvfb

Error: Unable to find a match: xorg-x11-server-Xvfb

从这里 How to install Xvfb (X virtual framebuffer) on Redhat 6.5? 我尝试了这个建议:

wget http://vault.centos.org/6.2/os/x86_64/Packages/xorg-x11-server-Xvfb-1.10.4-6.el6.x86_64.rpm
yum localinstall xorg-x11-server-Xvfb-1.10.4-6.el6.x86_64.rpm

但这给出了:

Error: Problem: conflicting requests

  • nothing provides libXdmcp.so.6()(64bit) needed by xorg-x11-server-Xvfb-1.10.4-6.el6.x86_64
  • nothing provides libXfont.so.1()(64bit) needed by xorg-x11-server-Xvfb-1.10.4-6.el6.x86_64
  • nothing provides libcrypto.so.10()(64bit) needed by xorg-x11-server-Xvfb-1.10.4-6.el6.x86_64
  • nothing provides xorg-x11-server-common >= 1.10.4-6.el6 needed by xorg-x11-server-Xvfb-1.10.4-6.el6.x86_64

有什么方法可以在 RH8 上安装 Xvfb 吗?

执行此操作的唯一方法(没有 RHEL 订阅)是执行以下安装,这些安装仅在按此顺序时有效:

yum install -y libXScrnSaver \
mesa-libgbm nss at-spi2-atk libX11-xcb \
ftp://ftp.redhat.com/pub/redhat/rhel/rhel-8-beta/appstream/x86_64/Packages/libxkbfile-1.0.9-9.el8.x86_64.rpm \
ftp://ftp.redhat.com/pub/redhat/rhel/rhel-8-beta/appstream/x86_64/Packages/xorg-x11-xkb-utils-7.7-26.el8.x86_64.rpm \
ftp://ftp.redhat.com/pub/redhat/rhel/rhel-8-beta/appstream/x86_64/Packages/xorg-x11-server-common-1.20.2-5.el8.x86_64.rpm \
ftp://ftp.redhat.com/pub/redhat/rhel/rhel-8-beta/appstream/x86_64/Packages/xorg-x11-xauth-1.0.9-12.el8.x86_64.rpm \
ftp://ftp.redhat.com/pub/redhat/rhel/rhel-8-beta/appstream/x86_64/Packages/libXdmcp-1.1.2-11.el8.x86_64.rpm \
ftp://ftp.redhat.com/pub/redhat/rhel/rhel-8-beta/appstream/x86_64/Packages/libXfont2-2.0.3-2.el8.x86_64.rpm \
ftp://ftp.redhat.com/pub/redhat/rhel/rhel-8-beta/appstream/x86_64/Packages/xorg-x11-server-Xvfb-1.20.2-5.el8.x86_64.rpm;

不知道为什么这么难

创建文件/etc/yum.repos.d/centos8.repo

[CentOS-8]
name=CentOS-8
baseurl=http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/
enabled=1
gpgcheck=1
gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official

然后:

rpm --import https://www.centos.org/keys/RPM-GPG-KEY-CentOS-Official
dnf install -y xorg-x11-server-Xvfb

如果您正在尝试 运行 cypress headless 之类的东西,您可能还需要其中一些:

atk java-atk-wrapper at-spi2-atk gtk3 libXt mesa-libgbm libdrm