canonical / canonical/sphinx-stack

pa11y installation dependencies on Linux distros

Open
#616 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
37
Forks
77
Avg merge
1d 5h
Merged PRs (30d)
3

Description

Trying to run `make pa11y` in a 'clean' Ubuntu environment (i.e. Multipass) leads to the following error:

```
Error: Failed to launch the browser process: Code: 127 stderr: /home/ubuntu/.cache/puppeteer/chrome/linux-148.0.7778.97/chrome-linux64/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://pptr.dev/troubleshooting
at ChildProcess.onClose (/home/ubuntu/docs/_dev/node_modules/@puppeteer/browsers/lib/cjs/launch.js:350:24)
at ChildProcess.emit (node:events:521:24)
at ChildProcess._handle.onexit (node:internal/child_process:295:12)
```

[Puppeteer's troubleshooting page](https://pptr.dev/troubleshooting#chrome-doesnt-launch-on-linux) suggests running:
`ldd /home/ubuntu/.cache/puppeteer/chrome/linux-148.0.7778.97/chrome-linux64/chrome | grep "not found"` and installing those missing. This leads to a decent number (~11) manual installations.

The list that worked for me:
* libasound2t64
* libcairo2
* libcups2t64
* libgbm1
* libxcomposite1
* libxdamage1
* libxfixes3
* libxrandr2
* libatk1.0-0
* libatk-bridge2.0-0
* libpango-1.0-0

While these don't have to be part of the `make pa11y-install` process, it would make life easier if it was included in a manner similar to `pdf-prep-force`. (It would be great to have the npm install handled as well if possible)

Contributor guide

Open the contributing guide

Research direction

Start by locating the make pa11y-install target and comparing its dependency setup with pdf-prep-force. Reproduce make pa11y in a clean Ubuntu Multipass environment, using the reported missing libraries as the baseline. Done means the target installs the required dependencies and npm packages, then launches pa11y successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, nodejs, ubuntu
Domain
accessibility, build-system, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.