Posts Learn Components Snippets Categories Tags Tools About
/

How to install Latest Stable Chrome Version in Ubuntu 20.04 (Puppeteer)

Learn how to install the latest stable chrome version (puppeteer) in Ubuntu 20.04 server the easy way.

Created on Sep 01, 2021

6091 views

To install the latest stable Chrome (Puppeteer) version in Ubuntu 20.04, you can run the command below.

Step 1: Download Setup with cURL


Firstly you will have to get the setup source using cURL as follows.
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -

Step 2: Install Required Ubuntu Dependency


Once you have done that, you need to get the necessary Ubuntu dependency. Do note that each of these dependencies is necessary for the puppeteer to run.
sudo apt-get install -y nodejs gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libgbm-dev libxshmfence-dev

Step 3: Install Puppeteer


Now that you have the necessary dependency you can install puppeteer using npm.
sudo npm install --global --unsafe-perm puppeteer

Step 4: Change Permission


The final step is that you have to change the permissions for the puppeteer.
sudo chmod -R o+rx /usr/lib/node_modules/puppeteer/.local-chromium

Full Installation Command


The full installation command is as follows. Do run it one line at a time.
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libgbm-dev libxshmfence-dev
sudo npm install --global --unsafe-perm puppeteer
sudo chmod -R o+rx /usr/lib/node_modules/puppeteer/.local-chromium

If you like our tutorial, do make sure to support us by being our Patreon or buy us some coffee ☕️

)