I can't deploy puppeteer on aws AWS Elastic Beanstalk.
I'm getting the following error:
Failed to launch the browser process!\n/var/app/current/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: /lib64/libdbus-1.so.3: no version information available (required by /usr/lib64/libatk-bridge-2.0.so.0)\n/var/app/current/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: /lib64/libdbus-1.so.3: no version information available (required by /usr/lib64/libatspi.so.0)\n/var/app/current/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: symbol lookup error: /var/app/current/node_modules/puppeteer/.local-chromium/linux-722234/chrome-linux/chrome: undefined symbol: g_type_class_adjust_private_offset\n\n\nTROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md\n"
Did anyone had the same issue and managed to solve it?
finally I solved it with this:
packages:
yum:
compat-libtiff3: []
commands:
chrome:
command: curl https://intoli.com/install-google-chrome.sh | bash
You need to add a number of shared libs, see https://github.com/puppeteer/puppeteer/issues/765#issuecomment-358111805
You will also need 'sudo yum install -y mesa-libgbm.x86_64'
And looks like it works only for puppeteer2.0.0, later version fails with https://github.com/puppeteer/puppeteer/issues/5379
This worked for me !
Connected remotly via SSH in elastic beanstalk
eb ssh {environment_name}
Install Google Chrome
curl https://intoli.com/install-google-chrome.sh | bash
Source :
https://dev.to/achimoraites/a-developers-guide-to-run-puppeteer-on-elastic-beanstalk-no-ubuntu-linux-4pl5
Solved it with the following post-build script after trying a whole bunch of different packages / versions.
Tested on Amazon Linux 2, Node.JS v16, puppeteer v15.3.0
#!/bin/bash
# Put this in your Amazon Elastic Beanstalk repo
# Tested on Amazon Linux 2, Node.JS v16, puppeteer v15.3.0
# File path: .platform/hooks/postdeploy/01_install_libs.sh
sudo amazon-linux-extras install epel -y
cd node_modules/puppeteer/
cd .local-chromium/linux-*/chrome-linux
sudo yum install cups-libs dbus-glib libXrandr libXcursor libXinerama cairo cairo-gobject pango libnss3-dev libgdk-pixbuf2.0-dev libgtk-3-dev libxss-dev libcups2
sudo rpm -ivh --nodeps --replacepkgs http://mirror.centos.org/centos/7/os/x86_64/Packages/atk-2.28.1-2.el7.x86_64.rpm
sudo rpm -ivh --nodeps http://mirror.centos.org/centos/7/os/x86_64/Packages/at-spi2-atk-2.26.2-1.el7.x86_64.rpm
sudo rpm -ivh --nodeps http://mirror.centos.org/centos/7/os/x86_64/Packages/at-spi2-core-2.28.0-1.el7.x86_64.rpm
sudo rpm -ivh --nodeps http://dl.fedoraproject.org/pub/archive/fedora/linux/releases/20/Fedora/x86_64/os/Packages/g/GConf2-3.2.6-7.fc20.x86_64.rpm
sudo rpm -ivh --nodeps http://dl.fedoraproject.org/pub/archive/fedora/linux/releases/20/Fedora/x86_64/os/Packages/l/libXScrnSaver-1.2.2-6.fc20.x86_64.rpm
sudo rpm -ivh --nodeps http://dl.fedoraproject.org/pub/archive/fedora/linux/releases/20/Fedora/x86_64/os/Packages/l/libxkbcommon-0.3.1-1.fc20.x86_64.rpm
sudo rpm -ivh --nodeps http://dl.fedoraproject.org/pub/archive/fedora/linux/releases/20/Fedora/x86_64/os/Packages/l/libwayland-client-1.2.0-3.fc20.x86_64.rpm
sudo rpm -ivh --nodeps http://dl.fedoraproject.org/pub/archive/fedora/linux/releases/20/Fedora/x86_64/os/Packages/l/libwayland-cursor-1.2.0-3.fc20.x86_64.rpm
sudo rpm -ivh --nodeps http://dl.fedoraproject.org/pub/archive/fedora/linux/releases/20/Fedora/x86_64/os/Packages/g/gtk3-3.10.4-1.fc20.x86_64.rpm
sudo rpm -ivh --nodeps http://dl.fedoraproject.org/pub/archive/fedora/linux/releases/16/Fedora/x86_64/os/Packages/gdk-pixbuf2-2.24.0-1.fc16.x86_64.rpm
sudo yum install -y chromium
Gist: https://gist.github.com/lucashenning/8f6807eab8b5d99caafd2a507f770ba1
Related
How to install git-lfs on an Amazon EC2 (Amazon Linux 2) instance?
Based on https://github.com/git-lfs/git-lfs/blob/main/INSTALLING.md did I tried:
sudo yum install git -y;
cd /home/ec2-user;
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
-> which tells me afterwards:
The repository is setup! You can now install packages.
sudo yum install git-lfs
-> gives me:
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
No package git-lfs available.
Error: Nothing to do
Future commands (not possible yet duo git: 'lfs' is not a git command. See 'git --help'. after git lfs install) would than be based on https://git-lfs.github.com/
git lfs install
...
git clone https://yourrepo.git;
Amazon Linux 2 AMI (HVM) - Kernel 5.10, SSD Volume Type / Arm
With Amazon Linux 2, you can use the Extras Library to install application and software updates on your instances. These software updates are known as topics.
Below are the steps:
Connect to your EC2 Linux instance using SSH.
Use the which command to confirm that the amazon-linux-extras package is installed:
$ which amazon-linux-extras
/usr/bin/amazon-linux-extras
If the amazon-linux-extras package isn't installed, you can use yum to install it:
$ sudo yum install -y amazon-linux-extras
To list the available topics, you can use the following command:
$ amazon-linux-extras list
git-lfs usually comes as part of the epel-release, so you need to first to install epel release for Amazon Linux:
$ sudo amazon-linux-extras install epel -y
For the Amazon Linux AMI, access to the Extra Packages for Enterprise Linux (EPEL) repository is configured, but it is not enabled by default.
sudo yum-config-manager --enable epel
Now you can install git-lfs or whatever else you like from epel-release:
$ sudo yum install git-lfs
As described on packagecloud[1], you need to run:
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | sudo bash
to install the dependencies and the repos. Alternatively you can take the script from [1] directly. You can then simply install with yum:
sudo yum install git-lfs
[1] https://packagecloud.io/github/git-lfs/install#bash-rpm
You need to directly install the ARM64 git-lfs binaries:
wget https://github.com/git-lfs/git-lfs/releases/download/v3.1.2/git-lfs-linux-arm64-v3.1.2.tar.gz
sudo yum install git -y
tar -xvf git-lfs-linux-arm64-v3.1.2.tar.gz
sudo ./install.sh
git lfs install
Now, enjoy your GIT-LFS on ARM64.
Having some issues installing the Azure CLI on a RHEL 7.6 VM in the Azure cloud. Been following this guide:
https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-yum?view=azure-cli-latest
I perform each step, but get this error:
Error: Package: azure-cli-2.9.1-1.el7.x86_64 (azure-cli)
Requires: python3
Error: Package: azure-cli-2.9.1-1.el7.x86_64 (azure-cli)
Requires: libpython3.6m.so.1.0()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I then tried installing just about every python3-related package at my disposal (python33.x86_64,
rh-python38.x86_64, etc), but still getting the same error. I then tried the following solution:
$ sudo yum install yum-utils
$ sudo yumdownloader azure-cli
$ sudo rpm -ivh --nodeps azure-cli-2.9.1-1.el7.x86_64.rpm
Commands succeed, but running a simple 'az login' command still fails...
[root#server ~]# rpm -ivh --nodeps azure-cli-2.9.1-1.el7.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:azure-cli-2.9.1-1.el7 ################################# [100%]
[root#server ~]# az login
/bin/az: line 2: /usr/bin/python3: No such file or directory
Any suggestions? Thanks again in advance.
So, I just completely went around the documentation and used a pip install.
# As non-privileged user
sudo yum install rh-python38 -y
scl enable rh-python38 bash
pip3 install --user azure-cli
All 'az' commands work flawlessly. Easy-peasy :-D
I try to update PHP 5.5 to up using command:
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Retrieving
https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
warning: /var/tmp/rpm-tmp.4xrPQL: Header V3 RSA/SHA256 Signature, key
ID 352c64e5: NOKEY error: Failed dependencies: epel-release = 6 is
needed by (installed) remi-release-6.8-1.el6.remi.noarch epel-release
= 6 is needed by (installed) ius-release-1.0-14.ius.centos6.noarch
How can I fix this?
You should epel for CentOS 6 not 7:
sudo yum install php-common
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
sudo rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
sudo yum install php70w php70w-opcache
sudo yum install php70w-fpm php70w-opcache
sudo yum install yum-plugin-replace
sudo yum replace php-common --replace-with=php70w-common
sudo yum install php70w-opcache
# remove old php-cli
sudo yum remove php-cli
sudo rm -rf /usr/bin/php
sudo yum -y install php70w-cli
For more informations check this link
I'm trying to install Docker on CentOS 6.6 64 bit version. When execute
sudo yum install docker
I get this
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirrors.psychz.net
* extras: centos-distro.cavecreek.net
* updates: distro.ibiblio.org
No package docker available.
Error: Nothing to do
Epel repository is not installed.
Run
sudo yum install epel-release
and then run
sudo yum install docker-io
I found the answer here
I needed to add the EPEL repository where Docker can be found.
Log into your machine as a user with sudo or root privileges.
Make sure your existing yum packages are up-to-date.
$ sudo yum update
Run the Docker installation script.
$ curl -sSL https://get.docker.com/ | sh
This script adds the docker.repo repository and installs Docker.
Start the Docker daemon.
$ sudo service docker start
If you are coming here for the same issue with RedHat, use
sudo yum install yum-utils
sudo yum-config-manager --enable rhui-REGION-rhel-server-extras
sudo yum install docker
How i can install mediainfo into my centos6 using wget command?
i tried those commands but i get errors:
wget http://mediaarea.net/download/binary/mediainfo-gui/0.7.71/mediainfo-gui-0.7.71-1.x86_64.RHEL_6.rpm
wget http://mediaarea.net/download/binary/mediainfo/0.7.71/mediainfo-0.7.71-1.x86_64.RHEL_6.rpm
wget http://mediaarea.net/download/binary/libmediainfo0/0.7.71/libmediainfo0-0.7.71-1.x86_64.RHEL_6.rpm
rpm -ivh mediainfo-gui-0.7.71-1.x86_64.RHEL_6.rpm
rpm -ivh mediainfo-0.7.71-1.x86_64.RHEL_6.rpm
rpm -ivh libmediainfo0-0.7.71-1.x86_64.RHEL_6.rpm
What i have done wrong?
Those RPMs are in the EPEL repo for CentOS. You'd be better off using them:
# yum --enablerepo extras install epel-release
# yum install mediainfo-gui mediainfo libmediainfo