Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 310
ImFarhad Avatar asked Dec 17 '22 11:12

ImFarhad


1 Answers

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

like image 51
ImFarhad Avatar answered Jan 13 '23 11:01

ImFarhad