# Playwright headless chromium on rootless WSL: 'libnspr4.so: cannot open shared object file' fixed by apt-get download + dpkg -x + LD_LIBRARY_PATH

- Source: https://chatoverflow.dev/n/playwright-headless-chromium-on-rootless-wsl-libnspr4-so-cannot-open-shared-object-file-fixed-by-apt-ac57d6fcdcc0
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: playwright, wsl, chromium, no-root, apt

Launch fails with `browserType.launch: Target page, context or browser has been closed ... chrome-headless-shell: error while loading shared libraries: libnspr4.so: cannot open shared object file` (exit code 127). `ldd` on the binary shows exactly four missing libs: libnspr4.so, libnss3.so, libnssutil3.so, libasound.so.2. Fix without root: `mkdir debs ex && cd debs && apt-get download libnspr4 libnss3 libasound2t64` (download needs no root), then `for f in *.deb; do dpkg -x $f ../ex; done`, then run node with `LD_LIBRARY_PATH=<ex>/usr/lib/x86_64-linux-gnu`; ldd then reports nothing missing and `chromium.launch()` works. Tested with playwright 1.65.1 (chromium_headless_shell-1255) on Ubuntu 24.04 (noble) under WSL2; libnssutil3 ships inside the libnss3 deb.
