[Package Request] - Playwright
What package is missing from Amazon Linux 2023? Please describe and include package name. playwright is an browser automation package,
Is this an update to existing package or new package request? new package request
Is this package available in Amazon Linux 2? If it is available via external sources such as EPEL, please specify.
Any additional information you'd like to include. (use-cases, etc) when i install playwright using pip in amazon linux 2023 first of all it recognized it as an ubuntu system and runs apt commands to download its packages, ultimately it fails, i have to manually install the required packages in order to run it on AL2023, but still it doesnot downloads all the depencies, only the bare minimum,
Requesting to support playwright on AL2023
As Amazon Linux 2023 does not currently ship any graphical web browser, this would likely be a prerequisite. I would recommend reporting the bug upstream to the playwright project though, as while the required packages may not be available in Amazon Linux 2023, picking the right package manager will be essential.
There are a number of packages PlayWright depends on when it installs its browsers - here is the list of dependencies not present in the package manager for AL2023:
- libicudata.so.66
- libicuuc.so.66
- libjpeg.so.8
- libwebp.so.6
- libhyphen.so.0
- libffi.so.7
- libx264.so
Some similarly-named packages exist but are not recognized as viable replacements by PlayWright.
Vercel using Amazon Linux 2023 as CI container, missing Playwright causing some package can't setup correctly. Ref to this issue.
I know this issue is a bit old, but I recently faced the same problem and managed to get it working on Amazon Linux 2023 by installing the necessary dependencies.
My OS details:
Amazon Linux release 2023.6.20250107 (Amazon Linux)
cpe:2.3:o:amazon:amazon_linux:2023
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023.6.20250107"
To fix the issue, I installed the following packages:
sudo dnf install -y libXcomposite libXcursor libXdamage libXext libXi libXtst cups-libs \
libXScrnSaver libXrandr gtk3 pango alsa-lib atk at-spi2-atk at-spi2-core libdrm \
libxkbcommon nss xorg-x11-server-Xvfb libgbm
Then I ran:
playwright install chromium
Don't worry if you see warnings like this:
BEWARE: your OS is not officially supported by Playwright; downloading fallback build for ubuntu20.04-x64.
That’s expected — Amazon Linux 2023 isn’t officially supported by Playwright, so it defaults to Ubuntu 20.04 builds. In most cases, this fallback works just fine as long as all required system libraries are present — which the above install command covers.
Hope this helps someone else!
@Ahmed-Soli i followed your example, but I get this in the console
Host system is missing dependencies to run browsers. ║
║ Missing libraries: ║
║ libicudata.so.66 ║
║ libicui18n.so.66 ║
║ libicuuc.so.66 ║
║ libwoff2dec.so.1.0.2 ║
║ libharfbuzz-icu.so.0 ║
║ libjpeg.so.8 ║
║ libwebp.so.6 ║
║ libenchant-2.so.2 ║
║ libsecret-1.so.0 ║
║ libhyphen.so.0 ║
║ libffi.so.7 ║
║ libevdev.so.2 ║
║ libGLESv2.so.2 ║
║ libx264.so
how do i fix this?
@paul-uz Thanks for testing it out! Looks like your system is missing a few extra libraries that Playwright Chromium relies on. You can install them with:
sudo dnf install -y \
libicu \
woff2 \
harfbuzz-icu \
libjpeg-turbo \
libwebp \
enchant2 \
libsecret \
hyphen \
libffi \
libevdev \
mesa-libGLES \
x264-libs
Notes:
-
These cover the errors you’re seeing (
libicu*,libwoff2dec,libharfbuzz-icu,libjpeg.so.8,libwebp.so.6,libenchant-2.so.2,libsecret-1.so.0,libhyphen.so.0,libffi.so.7,libevdev.so.2,libGLESv2.so.2,libx264.so). -
Amazon Linux 2023 ships with libffi.so.8 by default, but Playwright is looking for libffi.so.7. If needed, install the compat package:
sudo dnf install -y compat-libffi7(If
compat-libffi7isn’t available in your repos, the fallback is to symlinklibffi.so.7→libffi.so.8, though that’s not ideal.)
After installing, try again:
playwright install chromium
That should pull in all the missing pieces.
Unfortunately Al2023 has compat-libffi3.1 with libffi.so.6 and libffi with libffi.so.8, we don't ship .so.7