How to install Google Chrome on WSL

  • YC YC
  • |
  • 11 January 2022

There are times where you need a headless browser to run some test suite or run some jobs to generate files like critical css. This guide will show you how to install headless Google Chrome on Linux or WSL

Installing Google Chrome

  1. Ensure your dependencies are up to date.
sudo apt update && sudo apt -y upgrade
  1. Download and install Google Chrome
sudo apt -y install ./google-chrome-stable_current_amd64.deb
  1. Verify if Google Chrome installation is successful
which google-chrome
google-chrome --version


If you encounter this error:

Error: Failed to launch the browser process!
/e/workspace/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: error while loading shared libraries: cannot open shared object file: No such file or directory


    at onClose (/e/workspace/node_modules/puppeteer/lib/Launcher.js:750:14)
    at Interface.<anonymous> (/e/workspace/node_modules/puppeteer/lib/Launcher.js:739:50)
    at Interface.emit (node:events:402:35)
    at Interface.close (node:readline:586:8)
    at Socket.onend (node:readline:277:10)
    at Socket.emit (node:events:402:35)
    at endReadableNT (node:internal/streams/readable:1343:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Install the following lib should fix the error.

sudo apt-get install -y libxss1
comments powered by Disqus

You May Also Like