Package 'chromium-browser' has no installation candidate

25,093

Solution 1

I solved it as follows:

# install manually all the missing libraries
RUN apt-get install -y gconf-service libasound2 libatk1.0-0 libcairo2 libcups2 libfontconfig1 libgdk-pixbuf2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libxss1 fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils

# install chrome
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install

Solution 2

If you happen to be running a Debian-based image, the package you want is chromium (vs chromium-browser). So, for such images, this'll take care of it for you:

RUN apt-get install chromium -y

Solution 3

Use the following to install chrome in a docker container:

RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN dpkg -i google-chrome-stable_current_amd64.deb --fix-missing; apt-get -fy install`
Share:
25,093
Alex
Author by

Alex

Updated on April 01, 2021

Comments

  • Alex
    Alex about 3 years

    I am trying to install the chrome browser in a docker image with

    RUN apt-get install chromium-browser
    

    but I get the error:

    Package chromium-browser is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    
    E: Package 'chromium-browser' has no installation candidate
    

    How to correctly install chromium in a docker image?