Installing Puppeteer on Baota (CentOS 8)
When using CentOS 8, yum may fail because CentOS 8 is no longer officially maintained.
To fix this, you need to switch the YUM mirror source, clear the cache, and rebuild it.
1. Replace the YUM repository source
1 | wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo |
2. Clean YUM cache
1 | sudo yum clean all |
3. Rebuild YUM cache
1 | sudo yum makecache |
⚠️ Note:
CentOS 8 has reached End of Life (EOL) and is no longer maintained.
You must rely on third-party mirror sources to continue usingyum.
Puppeteer Dependency Download Error
When installing Puppeteer, you may encounter errors while downloading Chromium dependencies.
You can refer to this article for details:
https://www.cnblogs.com/ilizhu/p/14504049.html
Puppeteer Sandbox Error
On some servers (such as Baota or other managed VPS environments), Puppeteer may fail to launch Chromium due to sandbox restrictions.
Solution: Disable sandbox when launching Puppeteer
1 | // Add launch arguments to disable sandbox |