3

On running the command npm run test on ubuntu WSL-2 Windows 11. I get the following error:

[email protected] test
cypress run

It looks like this is your first time using Cypress: 9.7.0

Your system is missing the dependency: Xvfb

Install Xvfb and run Cypress again.

Read our documentation on dependencies for more information:

https://on.cypress.io/required-dependencies

If you are using Docker, we provide containers with all required dependencies installed.


Error: spawn Xvfb ENOENT


Platform: linux-x64 (Ubuntu - 20.04) Cypress Version: 9.7.0
I am not sure how to go about resolving this error. Any ideas?

Some Attempts:
sudo apt-get install libg tk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb

[sudo] password for ron:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgtk2.0-0 is already the newest version (2.24.32-4ubuntu4).
libgtk2.0-0 set to manually installed.
libxss1 is already the newest version (1:1.2.3-1).
libxss1 set to manually installed.
libxtst6 is already the newest version (2:1.2.3-1).
xauth is already the newest version (1:1.1-0ubuntu1).
xauth set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libgl1-mesa-dri : Depends: libglapi-mesa (= 20.2.6-0ubuntu0.20.04.1) but 21.2.6-0ubuntu0.1~20.04.2 is to be installed
 libqt5svg5 : Depends: libqt5widgets5 (>= 5.12.8+dfsg~) but it is not going to be installed
 xvfb : Depends: libgl1 but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
2
  • apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb? as per the link?
    – DavidPostill
    Dec 18, 2022 at 12:00
  • I resolved the error by installing each library in a separate apt-get install command. For some it gave the same error. The command sudo aptitude install <package-name> resolved it along with sudo apt-get update
    – nicku
    Dec 18, 2022 at 12:42

1 Answer 1

0

I faced same issue on Rocky Linux 8, and installing xorg-x11-server-Xvfb dnf package helped

dnf install -y chromium xorg-x11-server-Xvfb

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .