ImFarhad
ImFarhad

Reputation: 3209

error while loading shared libraries: libgbm.so.1: cannot open shared object file: Puppeteer in Nodejs on AWS EC2 instance

I'm using a Puppeteer module to scrape some data using Node.js. It was working fine on my Macbook but when I deployed the build on an AWS EC2 instance and hit the route that was scraping data it started throwing an error:

error while loading shared libraries: libgbm.so.1: cannot open shared object file

Upvotes: 43

Views: 62818

Answers (1)

ImFarhad
ImFarhad

Reputation: 3209

sudo apt-get update
sudo apt-get install -y libgbm-dev

Above command fixed my problem. While doing some research on this issue I also found some other useful links which might help someone.

Answer which helped me
Official Puppeteer Github Guide for different Platforms
Medium Tutorial

Upvotes: 107

Related Questions