amazon-linux-2023 icon indicating copy to clipboard operation
amazon-linux-2023 copied to clipboard

[Package Request] - chromium and chromedriver

Open Joe-Zer0 opened this issue 2 years ago • 13 comments

What package is missing from Amazon Linux 2023? Please describe and include package name. Please make the "chromium" package available in Amazon Linux 2023. We use headless chromium to run unit tests on typescript.

Is this an update to existing package or new package request? This is not currently available in Amazon Linux 2023.

Is this package available in Amazon Linux 2? If it is available via external sources such as EPEL, please specify. This is an EPEL package available in Amazon Linux 2.

Any additional information you'd like to include. (use-cases, etc) I am currently using the amazonlinux:2023 docker image. Thanks for your consideration!

Joe-Zer0 avatar May 23 '23 19:05 Joe-Zer0

I have the same need. Would like to switch to AL2023 but need chromium and chromedriver... this is the last roadblock.

chriscarruthers avatar Jun 06 '23 04:06 chriscarruthers

I have the same need

Krong1997 avatar Jun 17 '23 00:06 Krong1997

I was able to run chromium after installing this: dnf install atk at-spi2-atk cairo pango libdrm libxkbcommon cups-libs mesa-libgbm libXrandr libXcomposite libXdamage libXfixes alsa-lib

isaalx avatar Jun 20 '23 18:06 isaalx

I was able to run chromium after installing this: dnf install atk at-spi2-atk cairo pango libdrm libxkbcommon cups-libs mesa-libgbm libXrandr libXcomposite libXdamage libXfixes alsa-lib

Do you mean you compiled chromium from source then? Or did you get an RPM for it from somewhere? Either way we still really need it to be included in the repo.

chriscarruthers avatar Jun 21 '23 01:06 chriscarruthers

I was able to run chromium after installing this: dnf install atk at-spi2-atk cairo pango libdrm libxkbcommon cups-libs mesa-libgbm libXrandr libXcomposite libXdamage libXfixes alsa-lib

Do you mean you compiled chromium from source then? Or did you get an RPM for it from somewhere? Either way we still really need it to be included in the repo.

I forgot to say it was a workaround for dependencies, I was running chromium for unit testing using https://playwright.dev/

I hope this could help someone needing a quick workaround 😄

isaalx avatar Jun 26 '23 17:06 isaalx

I created a discussion on recommended way to install Chromium at https://github.com/amazonlinux/amazon-linux-2023/discussions/417

trivikr avatar Aug 14 '23 20:08 trivikr

@trivikr - That is installing Chrome, not Chromium. Here is our current install method for Chrome. If using for Angular testing, make sure to set CHROME_BIN so that Karma can find it.

RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm && \
yum install ./google-chrome-stable_current_x86_64.rpm -y

ENV CHROME_BIN=/usr/bin/google-chrome-stable

Joe-Zer0 avatar Aug 14 '23 21:08 Joe-Zer0

I would love to see an .ebextensions script which makes it easier to maintain the dependency when terminating / redeploying an instance. Not sure if thats even possible 🤓

hansemannn avatar Sep 16 '23 11:09 hansemannn

We need chromium headless aarch64 to be used with puppeteer.

formobi avatar Sep 19 '23 02:09 formobi

Well the problem with chrome and firefox is that both do not provide aarch64 builds for linux.

https://googlechromelabs.github.io/chrome-for-testing/ https://www.mozilla.org/en-GB/firefox/all/#product-desktop-release

Bugs: https://bugzilla.mozilla.org/show_bug.cgi?id=1646462 https://bugs.chromium.org/p/chromium/issues/detail?id=677140

IMHO we need upstream support and not rely on aws to be in sync with regular monthly releases.

But would love some compatible spec (srpm) file to build rpm ourselves.

matejsp avatar Sep 19 '23 04:09 matejsp

I would love to see an .ebextensions script which makes it easier to maintain the dependency when terminating / redeploying an instance. Not sure if thats even possible 🤓

this worked for me

commands: 01_install_chrome: command: sudo -- sh -c 'yum install -y https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm'

zavital avatar Jan 15 '24 23:01 zavital

The following is what I did to have Chrome for Testing, Google's recommended builds of Chrome and CheomeDriver for testing, working on an EC2 instance running Amazon Linux 2023. I hope this helps:

With Node.js

# A hacky way to install all the package dependencies required by Chrome for Testing.
# See: https://github.com/GoogleChromeLabs/chrome-for-testing/issues/55
sudo dnf install --assumeyes --quiet findutils
sudo dnf deplist https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm | \
  grep provider | \
  sort --unique | \
  awk '{print $2}' | \
  xargs sudo dnf install --best --allowerasing --skip-broken --assumeyes --quiet > /dev/null 2>&1

npx --yes @puppeteer/browsers install chrome@stable | \
  awk '{print $2}' | \
  xargs -I {} sudo ln --symbolic {} /usr/local/bin/chrome

npx --yes @puppeteer/browsers install chromedriver@stable | \
  awk '{print $2}' | \
  xargs -I {} sudo install --owner=root --group=root --mode=+x {} /usr/local/bin/chromedriver

Without Node.js

# A hacky way to install all the package dependencies required for Chrome for Testing.
# See: https://github.com/GoogleChromeLabs/chrome-for-testing/issues/55
sudo dnf install --assumeyes --quiet findutils jq unzip
sudo dnf deplist https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm | \
  grep provider | \
  sort --unique | \
  awk '{print $2}' | \
  xargs sudo dnf install --best --allowerasing --skip-broken --assumeyes --quiet > /dev/null 2>&1

CHROME_FOR_TESTING_RELEASE="$(curl --silent https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq '.channels.Stable')"

CHROME_DOWNLOAD_URL="$(echo ""${CHROME_FOR_TESTING_RELEASE}"" | jq -r '.downloads.chrome[] | select(.platform == "linux64") | .url')"
curl --remote-name --silent "${CHROME_DOWNLOAD_URL}"
unzip -q chrome-linux64.zip
sudo ln --symbolic "${PWD}/chrome-linux64/chrome" /usr/local/bin/chrome

CHROMEDRIVER_DOWNLOAD_URL="$(echo ""${CHROME_FOR_TESTING_RELEASE}"" | jq -r '.downloads.chromedriver[] | select(.platform == "linux64") | .url')"
curl --remote-name --silent "${CHROMEDRIVER_DOWNLOAD_URL}"
unzip -q chromedriver-linux64.zip
sudo install --owner=root --group=root --mode=+x "${PWD}/chromedriver-linux64/chromedriver" /usr/local/bin/chromedriver

finalfantasia avatar Jan 18 '24 05:01 finalfantasia

As per https://github.com/amazonlinux/amazon-linux-2023/issues/543 - there is a request also for chromedriver. I've edited the title of this issue accordingly.

stewartsmith avatar May 15 '24 17:05 stewartsmith