"resin/raspberry-pi-debian:buster" doesn't have the "chromium" package while building, but does when the container is installed!


#1
FROM resin/raspberry-pi-debian:buster

RUN apt-get update && apt-get install -y \
    build-essential \
    python3 python3-dev python3-pip  \
    chromium \  <- THIS
    libzmq3-dev \
    dnsmasq wireless-tools \
    alsa-utils libasound2-dev \
    htop psmisc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
...

While building my image, I get the following error:

[main]  Step 7/15 : RUN apt-get update && apt-get install -y     build-essential     python3 python3-dev python3-pip      chromium     libzmq3-dev     dnsmasq wireless-tools     alsa-utils libasound2-dev     htop psmisc && apt-get clean && rm -rf /var/lib/apt/lists/*
[main]   ---> Running in 254699db1c7c
[main]  Get:1 http://archive.raspbian.org/raspbian buster InRelease [15.0 kB]
[main]  Get:2 http://archive.raspbian.org/raspbian buster/rpi armhf Packages [1299 B]
[main]  Get:3 http://archive.raspbian.org/raspbian buster/non-free armhf Packages [122 kB]
[main]  Get:4 http://archive.raspbian.org/raspbian buster/firmware armhf Packages [1201 B]
[main]  Get:5 http://archive.raspbian.org/raspbian buster/main armhf Packages [17.8 MB]
[main]  Get:6 http://archive.raspbian.org/raspbian buster/contrib armhf Packages [68.6 kB]
[main]  Fetched 18.0 MB in 4s (4686 kB/s)
[main]  Reading package lists...
[main]  Reading package lists...
[main]  Building dependency tree...
[main]  Reading state information...
[main]  Package chromium is not available, but is referred to by another package.
[main]  This may mean that the package is missing, has been obsoleted, or
[main]  is only available from another source
[main]  However the following packages replace it:
[main]    chromium-bsu
[main]  E: Package 'chromium' has no installation candidate
[main]  
[main]  Removing intermediate container 254699db1c7c
[main]  The command '/bin/sh -c apt-get update && apt-get install -y     build-essential     python3 python3-dev python3-pip      chromium     libzmq3-dev     dnsmasq wireless-tools     alsa-utils libasound2-dev     htop psmisc && apt-get clean && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

However, when I ssh into the container, the chromium package is there!

root@d4ba131:/usr/src/app# apt search chromium
Sorting... Done
Full Text Search... Done
cgpt/testing 0~R63-10032.B-3 armhf
  GPT manipulation tool with support for Chromium OS extensions

chrome-gnome-shell/testing 9-1 all
  GNOME Shell extensions integration for web browsers

chromium/now 67.0.3396.87-1 armhf [installed,local]  <- HERE!
  web browser

#4

Hi,

The resin/raspberry-pi-debian:buster is based off Raspbian and I think that they don’t have chromium package in the raspbian buster repository so if you want to install that package, I think you should add external repository and install it from there.

Another thing is we don’t preinstall chromium in our base images and your build failed so what is the container that you sshed into?


#5

I ssh-ed into the main_<hash> container using the resin local ssh command.

It was definitely a resin container…

OTOH, I did manage to install chromium using the ubuntu repos.

RUN apt-get update && apt-get install -y \
    lsb-release libatk-bridge2.0-0 libatk1.0-0 libcairo2 libatk-bridge2.0-0 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 xdg-utils \
    wget build-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN wget -q "http://ports.ubuntu.com/ubuntu-ports/pool/universe/c/chromium-browser/chromium-codecs-ffmpeg-extra_67.0.3396.99-0ubuntu1_armhf.deb" \
&& wget -q "http://ports.ubuntu.com/ubuntu-ports/pool/universe/c/chromium-browser/chromium-browser-l10n_67.0.3396.99-0ubuntu1_all.deb" \
&& wget -q "http://ports.ubuntu.com/ubuntu-ports/pool/universe/c/chromium-browser/chromium-browser_67.0.3396.99-0ubuntu1_armhf.deb" \
&& dpkg -i "chromium-codecs-ffmpeg-extra_67.0.3396.99-0ubuntu1_armhf.deb" \
&& dpkg -i "chromium-browser-l10n_67.0.3396.99-0ubuntu1_all.deb" "chromium-browser_67.0.3396.99-0ubuntu1_armhf.deb"

However, when I try to run it;

root@388562a:/usr/src/app# chromium-browser --headless
Illegal instruction (core dumped)

Do you have any idea how can I get chromium working on a raspberry pi zero?
(I need it for using puppeteer, to do a webRTC call)


#6

I’m trying to do the same thing. Do you have an update?


#7

Ended up using the chromium-browser package in the “stretch” version of their distribution

(You can provide the path chromium browser binary using a option to puppeteer)

Beware though, chrome uses like 80% cpu on the raspberry pi zero which is not acceptable for my use case…