Reputation: 618
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
Upvotes: 23
Views: 41600
Reputation: 1
Uninstall google-chrome with next command: sudo apt remove google-chrome-stable and to correct the error in the library and then install the package you need.
The following packages have unmet dependencies: google-chrome-stable : Depends: libu2f-udev but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Upvotes: -1
Reputation: 171
wget http://archive.ubuntu.com/ubuntu/pool/main/libu/libu2f-host/libu2f-udev_1.1.4-1_all.deb
dpkg -i libu2f-udev_1.1.4-1_all.deb
and retry update chrome
Upvotes: 17
Reputation: 21
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:
### Commented entries have reasonable defaults.
### Uncomment to edit them.
# Source: <source package name; defaults to package name>
Section: misc
Priority: optional
# Homepage: <enter URL here; no default>
Standards-Version: 3.9.2
Package: libu2f-udev
# Version: <enter version here; defaults to 1.0>
# Maintainer: Your Name <[email protected]>
# Pre-Depends: <comma-separated list of packages>
# Depends: <comma-separated list of packages>
# Recommends: <comma-separated list of packages>
# Suggests: <comma-separated list of packages>
Provides: libu2f-udev
# Replaces: <comma-separated list of packages>
# Architecture: all
# Multi-Arch: <one of: foreign|same|allowed>
# Copyright: <copyright file; defaults to GPL2>
# Changelog: <changelog file; defaults to a generic changelog>
# Readme: <README.Debian file; defaults to a generic one>
# Extra-Files: <comma-separated list of additional files>
# Files: <pair of space-separated paths;>
# <more pairs, if there's more than one file to include.>
Description: <short description; defaults to some wise words>
long description and info
.
second paragraph
Upvotes: 2
Reputation: 301
Creating a dummy package which provides libu2f-udev fixes the issue. I followed below steps for Ubuntu 16.04. Install equivs package
sudo apt install equivs
equivs-control libu2f-udev
This creates a file libu2f-udev. Edit this file and give libu2f-udev as value of "Package" and "Provides" keys. Then execute
equivs-build libu2f-udev
This creates dummy package libu2f-udev_1.0_all.deb. Install it by
sudo dpkg -i libu2f-udev_1.0_all.deb
All set.
Upvotes: 14