I have a Dockerfile that attempts to install the package google-chrome-stable
among other packages in Ubuntu (v16 Xenial I think) as part of a Gitlab pipeline step. I have had no issues until recently, when the step started failing with this issue:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
google-chrome-stable : Depends: libu2f-udev but it is not installable
E: Unable to correct problems, you have held broken packages.
It seems like the libu2f-udev
has recently become a depends
instead of a recommends
– but I’m not sure how to fix this. Here is the part of the Dockerfile in question:
FROM -.dkr.ecr.us-east-1.amazonaws.com/ubuntu:xenial
EXPOSE 9222
# Install ubuntu dependencies
RUN apt-get update &&
apt-get -y upgrade &&
apt-get install -yq curl libgconf-2-4
# Install Google Chrome Stable
RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &&
apt-get install -y wget gnupg &&
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb stable main' >> /etc/apt/sources.list.d/google-chrome.list &&
apt-get update &&
apt-get install -y --no-install-recommends
google-chrome-stable
fonts-ipafont-gothic
fonts-wqy-zenhei
fonts-thai-tlwg
fonts-kacst ttf-freefont &&
rm -fr /var/lib/apt/lists/* &&
apt-get purge --auto-remove -y curl &&
rm -fr /src/*.deb
I would think the apt-get update
before the install would fix this but it is not. Any help is appreciated, thanks!
Edit: also, I know that Ubuntu 16 is no longer receiving standard support (this is a pretty old service I’m working with). If upgrading to v18 or higher would help that would also be good to know
3
Answers
Creating a dummy package which provides libu2f-udev fixes the issue. I followed below steps for Ubuntu 16.04. Install equivs package
This creates a file libu2f-udev. Edit this file and give libu2f-udev as value of "Package" and "Provides" keys. Then execute
This creates dummy package libu2f-udev_1.0_all.deb. Install it by
All set.
The contents of the libu2f-udev file should be like this
Tested on 16.04.7 LTS & chrome 110.0.5481.100. In case it is not clear, the libu2f-udev file after editing should look like this:
and retry update chrome