返回博客
2026年5月5日2 阅读2 分钟阅读开发者

ubuntu安装playwright 浏览器

(TraeAI-7) ~/dev [1] $ cd '/home/lyh/dev' ; cd /tmp && npx playwright install chromium Need to inst...

(TraeAI-7) ~/dev [1] $ cd ‘/home/lyh/dev’ ; cd /tmp && npx playwright install chromium Need to install the following packages: playwright@1.59.1 Ok to proceed? (y) y ╔═══════════════════════════════════════════════════════════════════════════════╗ ║ WARNING: It looks like you are running ‘npx playwright install’ without first ║ ║ installing your project’s dependencies. ║ ║ ║ ║ To avoid unexpected behavior, please install your dependencies first, and ║ ║ then run Playwright’s install command: ║ ║ ║ ║ npm install ║ ║ npx playwright install ║ ║ ║ ║ If your project does not yet depend on Playwright, first install the ║ ║ applicable npm package (most commonly @playwright/test), and ║ ║ then run Playwright’s install command to download the browsers: ║ ║ ║ ║ npm install @playwright/test ║ ║ npx playwright install ║ ║ ║ ╚═══════════════════════════════════════════════════════════════════════════════╝ Downloading Chrome for Testing 147.0.7727.15 (playwright chromium v1217) from https://cdn.playwright.dev/builds/cft/147.0.7727.15/linux64/chrome-linux64.zip 170.4 MiB [====================] 100% 0.0s Chrome for Testing 147.0.7727.15 (playwright chromium v1217) downloaded to /home/lyh/.cache/ms-playwright/chromium-1217 Downloading FFmpeg (playwright ffmpeg v1011) from https://playwright.download.prss.microsoft.com/dbazure/download/playwright/builds/ffmpeg/1011/ffmpeg-linux.zip 2.3 MiB [====================] 100% 0.0s FFmpeg (playwright ffmpeg v1011) downloaded to /home/lyh/.cache/ms-playwright/ffmpeg-1011 Downloading Chrome Headless Shell 147.0.7727.15 (playwright chromium-headless-shell v1217) from https://cdn.playwright.dev/builds/cft/147.0.7727.15/linux64/chrome-headless-shell-linux64.zip 112 MiB [======== ] 40% 37.3sDownloading Chrome Headless Shell 147.0.7727.15 (playwright chromium-headless-shell v1217) from https://cdn.playwright.d112 MiB [====================] 100% 0.0s Chrome Headless Shell 147.0.7727.15 (playwright chromium-headless-shell v1217) downloaded to /home/lyh/.cache/ms-playwright/chromium_headless_shell-1217