puppeteer: [Bug]: docker install puppeteer Package google-chrome-stable is not available, but is referred to by another package.
Bug description
Running Puppeteer in Docker with https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#running-puppeteer-in-docker
terminal output:
15.15 Hit:1 http://security.debian.org/debian-security stretch/updates InRelease
15.15 Ign:2 http://deb.debian.org/debian stretch InRelease
15.34 Hit:3 http://deb.debian.org/debian stretch-updates InRelease
15.45 Get:4 http://dl.google.com/linux/chrome/deb stable InRelease [1811 B]
15.55 Hit:5 http://deb.debian.org/debian stretch Release
16.05 Get:7 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1099 B]
16.08 Fetched 2910 B in 1s (1999 B/s)
16.08 Reading package lists...
16.43 Reading package lists...
16.75 Building dependency tree...
16.80 Reading state information...
16.80 Package google-chrome-stable is not available, but is referred to by another package.
16.80 This may mean that the package is missing, has been obsoleted, or
16.80 is only available from another source
16.80
16.81 E: Package 'google-chrome-stable' has no installation candidate
------
thanks
Puppeteer version
latest
Node.js version
node:12-slim
npm version
6
What operating system are you seeing the problem on?
Apple Silicon(M1)Mac macOS Monterey
Relevant log output
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 20
- Comments: 15
This made the job for me:
docker build . -t my_service --platform=linux/amd64
Unfortunately, @BrTkCa’s solution didn’t work for me 😦 [MacBook Pro M1 Pro running macOS Monterey]
Forgot to add, I’m using Multipass to host the Docker containers.
If I add
--platform=linux/amd64
then the docker build command finishes but I get the following error when trying to use Puppeteer inside Docker container.The same code works as expected on my old Intel Mac.
edit:
I was able to get it working with lima https://github.com/lima-vm/lima. But it’s quite slow.
This blog post explains how to set it up. https://binx.io/2022/06/23/how-to-run-intel-docker-images-on-mac-m1-using-lima/
Currently encountering the same error on the MacBookAir m1 😦
The above fix didn’t work for me. I had to upgrade to Node 14 to get this working.
@BrTkCa Thanks for the help, it works for me as well.