Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Puppeteer/Chrome Headless on EC2 Amazon Linux AMI
#!/bin/env bash
# Install 3rd party repositories
sudo rpm -ivh --nodeps
sudo rpm -ivh --nodeps
sudo rpm -ivh --nodeps
# Install dependencies
sudo yum install -y nodejs gcc-c++ make cups-libs dbus-glib libXrandr libXcursor libXinerama cairo cairo-gobject pango libXScrnSaver gtk3
# On Amazon Linux 2 Downgrade ALSA library
sudo yum remove alsa-lib-
sudo yum install alsa-lib-1.1.3-3.amzn2.x86_64
# Remove old versions of node and npm
sudo yum remove -y nodejs npm
# Install yarn
sudo yum install -y yarn
curl -sL httls:// | sudo tee /etc/yum.repos.d/yarn.repo
curl -sL | sudo bash -
mkdir puppeteer
cd puppeteer
npm install puppeteer
cd .local-chromium/linux*/chrome-linux
Copy link

Thanks for sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment