Replies: 11 comments 21 replies
-
One solution which worked for me it to install Chromium directly from RPM $ export BROWSERS_SRC_DIR="/usr/src/browsers" && mkdir -p $BROWSERS_SRC_DIR
$ curl https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm \
--output $BROWSERS_SRC_DIR/google-chrome-stable_current_x86_64.rpm
$ yum install -y -q $BROWSERS_SRC_DIR/google-chrome-stable_current_x86_64.rpm
$ /usr/bin/google-chrome-stable --version |
Beta Was this translation helpful? Give feedback.
-
Are you trying to install an x86_64 package on an aarch64 instance ? |
Beta Was this translation helpful? Give feedback.
-
I attempted using $ node -v
v18.17.1
$ npx --yes @puppeteer/browsers install chrome@stable
Downloading chrome r117.0.5938.88 - 146.7 MB [====================] 100% 0.0s
[email protected] /home/ec2-user/chrome/linux-117.0.5938.88/chrome-linux64/chrome As of 2023-09-18, it fails with missing dependency $ /home/ec2-user/chrome/linux-117.0.5938.88/chrome-linux64/chrome --version
/home/ec2-user/chrome/linux-117.0.5938.88/chrome-linux64/chrome: error while loading shared libraries: libatk-1.0.so.0: cannot open shared object file: No such file or directory |
Beta Was this translation helpful? Give feedback.
-
Try |
Beta Was this translation helpful? Give feedback.
-
Install missing dependencies:
|
Beta Was this translation helpful? Give feedback.
-
The following is what I did to have Chrome 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 for Chrome for Testing.
# See: https://github.com/GoogleChromeLabs/chrome-for-testing/issues/55
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
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 ln --symbolic {} /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
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 ln --symbolic "${PWD}/chromedriver-linux64/chromedriver" /usr/local/bin/chromedriver |
Beta Was this translation helpful? Give feedback.
-
The flatpak of Chromium also works well. I've used this with remote X |
Beta Was this translation helpful? Give feedback.
-
extremely late but this worked for me |
Beta Was this translation helpful? Give feedback.
-
I've used bits and parts of the answers provided here as my use case was slightly different - I wanted to run Here is my
The libraries installed are to ensure that The install of chromium is coming from You'll notice that I'm setting the permissions to use After doing all this, I was able to run References: |
Beta Was this translation helpful? Give feedback.
-
here is the full Beanstalk extension file that works for puppeteer on file name:
|
Beta Was this translation helpful? Give feedback.
-
This is my config file for installing on Linux 2023 but on arm processor .ebextensions/10_arm_puppeteer_install.config
And this in my post deploy hook
and this is the js file I call to produce the pdfs
I then system call |
Beta Was this translation helpful? Give feedback.
-
When I search for how to install Chromium on Amazon Linux, the top result is to use
amazon-linux-extras
as follows:This solution does not work in AL2023, as it does not support amazon-linux-extras.
What's the recommended way for installing Chromium on AL2023?
Beta Was this translation helpful? Give feedback.
All reactions