playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[BUG] Unable to install in ubuntu 23.04 due to missing packages

Open scarf005 opened this issue 2 years ago • 1 comments

System info

  • Playwright Version: 1.34.3
  • Operating System: Ubuntu 23.04
  • Browser: Firefox

Source code

  • [x] I provided exact source code that allows reproducing the issue locally.

Steps (https://playwright.dev/docs/intro#installing-playwright)

  • run LANG=c pnpm exec playwright install-deps

Expected

dependencies are installed

Actual

following packages are missing: libicu70, libffi7, libx264-163

LANG=c pnpm exec playwright install-deps                                                                                                                 30.3s  2023년 05월 26일 (금) 오전 10시 50분 21초Installing dependencies...
Switching to root user to install dependencies...
Hit:1 https://download.docker.com/linux/ubuntu kinetic InRelease
Hit:2 http://packages.microsoft.com/repos/code stable InRelease                                                                                                                                                                                      
Get:3 https://cli.github.com/packages stable InRelease [3917 B]                                                                                                                           
Hit:4 https://dl.winehq.org/wine-builds/ubuntu kinetic InRelease                                                                                                                                            
Hit:5 http://security.ubuntu.com/ubuntu lunar-security InRelease                                                                                                                                            
Hit:6 https://dl.google.com/linux/chrome/deb stable InRelease                                                                                   
Hit:7 http://kr.archive.ubuntu.com/ubuntu lunar InRelease           
Hit:8 http://ppa.launchpad.net/kxstudio-debian/libs/ubuntu focal InRelease
Hit:9 http://kr.archive.ubuntu.com/ubuntu lunar-updates InRelease          
Hit:10 http://kr.archive.ubuntu.com/ubuntu lunar-backports InRelease       
Hit:11 http://ppa.launchpad.net/kxstudio-debian/plugins/ubuntu focal InRelease
Hit:12 http://ppa.launchpad.net/kxstudio-debian/apps/ubuntu focal InRelease
Hit:13 http://ppa.launchpad.net/kxstudio-debian/kxstudio/ubuntu focal InRelease
Hit:14 https://repo.steampowered.com/steam stable InRelease                
Hit:15 http://ppa.launchpad.net/kxstudio-debian/libs/ubuntu bionic InRelease
Hit:16 http://ppa.launchpad.net/kxstudio-debian/music/ubuntu bionic InRelease
Hit:17 http://ppa.launchpad.net/kxstudio-debian/plugins/ubuntu bionic InRelease
Hit:18 http://ppa.launchpad.net/kxstudio-debian/apps/ubuntu bionic InRelease
Hit:19 http://ppa.launchpad.net/kxstudio-debian/kxstudio/ubuntu bionic InRelease
Hit:20 https://ppa.launchpadcontent.net/cappelikan/ppa/ubuntu lunar InRelease
Hit:21 https://ppa.launchpadcontent.net/kubuntu-ppa/beta/ubuntu lunar InRelease
Hit:22 https://ppa.launchpadcontent.net/libreoffice/ppa/ubuntu lunar InRelease                                                                                                                                                                              
Fetched 3917 B in 7s (537 B/s)                                                                                                                                                                                                                              
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package libicu70
E: Unable to locate package libffi7
E: Unable to locate package libx264-163
Failed to install browser dependencies
Error: Installation process exited with code: 100

scarf005 avatar May 26 '23 01:05 scarf005

Usually Playwright's team supports Ubuntu LTS versions, which 23.04 is not, so they might fix this issue as best effort but it might not happen. Let's wait to see their answer.

https://ubuntu.com/about/release-cycle

https://playwright.dev/docs/troubleshooting#linux

ltsuda avatar May 26 '23 02:05 ltsuda

a) Developers are probably less likely than the average user to stick with LTS

b) If you don't want to support changing OS dependencies, better to provide a flatpak or (at worst) snap instead

libicu and libx264 both have names that change regularly, since they are packaging something upstream which has a changing version. I don't agree with their rationale, but to future proof there should likely be a dynamic apt-cache search for the base name.

libffi7 was replaced by libffi8 starting in 22.04 (which had both); should switch for future proofing anyway.

reubenfirmin avatar May 28 '23 18:05 reubenfirmin

Playwright only supports Ubuntu LTS versions like @ltsuda wrote, if you want to stick with non-LTS versions, we recommend Docker. The reasoning is that compiling browsers, especially WebKit is highly coupled to the OS dependencies, which are dynamically linked. Thanks for your understanding!

mxschmitt avatar May 30 '23 08:05 mxschmitt

You can do the following:

  1. go to https://packages.ubuntu.com
  2. search those packages
  3. download the version for your architecture
  4. Install them
  5. run npx playwright install-deps again

It seems it's working so far

hacknlove avatar Aug 09 '23 07:08 hacknlove

In my case, these packages where missing on my Ubuntu 23.04:

E: Unable to locate package libicu70 E: Unable to locate package libffi7 E: Unable to locate package libx264-163

I was able to download all of them via https://packages.ubuntu.com as suggested by @hacknlove, thanks!

ndabAP avatar Mar 02 '24 06:03 ndabAP

@mxschmitt Will Playwright support Ubuntu 24.04, which is going to be released soon?

mwanago avatar Apr 14 '24 16:04 mwanago

@mwanago yes, we will add support for it as soon as its available via GitHub Actions.

mxschmitt avatar Apr 14 '24 16:04 mxschmitt