Posts Learn Components Snippets Categories Tags 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

18 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

Snippets by

PostSrc poster

PostSrc

Full stack developer mainly focusing on the front end side of the web. The main author of PostSrc and loves writing tutorial and guides online.

new

PostSrc Code Components

Collection of Tailwind CSS components for everyone to use. Browse all of the components that's right for your project.

View Components

Other Code Snippets

More