#10 4.889 E: Unable to correct problems, you have held broken packages.

「#10 4.889 E: Unable to correct problems, you have held broken packages.」のアイキャッチ画像

dockerにchrome driver入れようと試みたところ、タイトルのエラーが発生しました

結論はこちら

FROM ruby:2.7.2

WORKDIR /app
# こちらの2行を追加
RUN dpkg --add-architecture amd64
RUN dpkg --print-foreign-architectures

# Using Node.js v14.x(LTS)
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash -

# Add packages
RUN apt-get update && apt-get install -y \
      git \
      nodejs \
      vim

# Add yarnpkg for assets:precompile
RUN npm install -g yarn

# Add Chrome
RUN curl -sO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
    && apt install -y ./google-chrome-stable_current_amd64.deb \
    && rm google-chrome-stable_current_amd64.deb

# Add chromedriver
RUN CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` \
    && curl -sO https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip \
    && unzip chromedriver_linux64.zip \
    && mv chromedriver /usr/bin/chromedriver

※下記が詳しいエラー内容

#10 4.889 E: Unable to correct problems, you have held broken packages.
------
executor failed running [/bin/sh -c apt-get update && curl -sO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb     && apt install -y ./google-chrome-stable_current_amd64.deb     && rm google-chrome-stable_current_amd64.deb]: exit code: 100
ERROR: Service 'web' failed to build : Build failed

参考記事

google chromeをDocker環境にインストールしたい
Ubuntu/Debian でマルチアーキテクチャを有効/無効にする備忘録