Docker image build failure - Centos and Node - node.js

I am trying to build a docker image through Jenkins using Centos 8 as base. My Dockerfile looks like this (only relevant lines are included):
RUN yum update -y \
&& curl -sL https://rpm.nodesource.com/setup_current.x | bash - \
&& yum install -y nodejs unzip sudo numactl-libs libnsl libaio \
Build is failing with below error:
--> Finished Dependency Resolution
[91mError: Package: 2:nodejs-18.7.0-1nodesource.x86_64 (nodesource)
Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
[91mError: Package: 2:nodejs-18.7.0-1nodesource.x86_64 (nodesource)
Requires: libm.so.6(GLIBC_2.27)(64bit)
[91mError: Package: 2:nodejs-18.7.0-1nodesource.x86_64 (nodesource)
Requires: libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
[91mError: Package: 2:nodejs-18.7.0-1nodesource.x86_64 (nodesource)
Requires: libc.so.6(GLIBC_2.28)(64bit)
[91mError: Package: 2:nodejs-18.7.0-1nodesource.x86_64 (nodesource)
Requires: libstdc++.so.6(CXXABI_1.3.9)(64bit)
It seems like since the node version is not specified in dockerfile, the latest node version (18.7.0) is being installed and hence some dependencies are not found. Last build (few months back) had node v17. If this is the root cause, can someone help me with suggestions on how this can be fixed.

Related

Why am i getting this error nodejs install on centos

I have Centos 7.9 server and I'm trying to install nodejs.
curl --silent --location https://rpm.nodesource.com/setup_18.x | sudo bash -
repository is configured in the file /etc/yum.repos.d/nodesource-el7.repo
after that when typed sudo yum install nodejs its returned:
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 2:18.13.0-1nodesource will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.28)(64bit) for package: 2:nodejs-18.13.0-1nodesource.x86_64
--> Processing Dependency: libm.so.6(GLIBC_2.27)(64bit) for package: 2:nodejs-18.13.0-1nodesource.x86_64
--> Finished Dependency Resolution
Error: Package: 2:nodejs-18.13.0-1nodesource.x86_64 (nodesource)
Requires: libc.so.6(GLIBC_2.28)(64bit)
Error: Package: 2:nodejs-18.13.0-1nodesource.x86_64 (nodesource)
Requires: libm.so.6(GLIBC_2.27)(64bit)
You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
mod_fcgid-2.3.9-6.el7.x86_64 has missing requires of httpd-mmn = ('0', '20120211x8664', None)
and I can't install any other version of nodejs

Install node in Amazon Linux 2

I purchased Amazon Linux 2 machine using AWS LightSail and tried to install node on that machine. But after several tries I can't able to install node and got the error shared below.
[root#ip-my public ip /]# sudo yum install nodejs
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 2:18.3.0-1nodesource will be installed
--> Processing Dependency: libc.so.6(GLIBC_2.28)(64bit) for package: 2:nodejs-18.3.0-1nodesource.x86_64
--> Processing Dependency: libm.so.6(GLIBC_2.27)(64bit) for package: 2:nodejs-18.3.0-1nodesource.x86_64
--> Finished Dependency Resolution
Error: Package: 2:nodejs-18.3.0-1nodesource.x86_64 (nodesource)
Requires: libc.so.6(GLIBC_2.28)(64bit)
Error: Package: 2:nodejs-18.3.0-1nodesource.x86_64 (nodesource)
Requires: libm.so.6(GLIBC_2.27)(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Thanks in advance!
I think AWS LightSail Amazon Linux 2 supports node version <=16.x,
So we want to install node version <=16, I installed node version 16 and it works!!
Here are the steps followed,
Step 1:- Configure Yum Repository
$ sudo yum install -y gcc-c++ make
$ curl -sL https://rpm.nodesource.com/setup_16.x | sudo -E bash -
Step 2:– Install Node.js on Amazon Linux
$ sudo yum install -y nodejs
Step 3 – Check Version
$ node -v
$ npm -v
My solution to fix this problem, you must erase cache with this command:
sudo rm -R /var/cache/yum/x86_64/2/nodesource/
Now, you can download the correct version:
curl -sL https://rpm.nodesource.com/setup_16.x | sudo -E bash -
And now you can install:
sudo yum install -y nodejs

Cannot install docker in a RHEL server

I am getting Requires: fuse-overlayfs >= 0.7 error while installing docker in RHEL-7.
sudo yum install docker-ce
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
* epel: mirrors.syringanetworks.net
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 3:20.10.2-3.el7 will be installed
--> Processing Dependency: containerd.io >= 1.4.1 for package: 3:docker-ce-20.10.2-3.el7.x86_64
--> Processing Dependency: docker-ce-cli for package: 3:docker-ce-20.10.2-3.el7.x86_64
--> Processing Dependency: docker-ce-rootless-extras for package: 3:docker-ce-20.10.2-3.el7.x86_64
--> Running transaction check
---> Package containerd.io.x86_64 0:1.4.3-3.1.el7 will be installed
---> Package docker-ce-cli.x86_64 1:20.10.2-3.el7 will be installed
---> Package docker-ce-rootless-extras.x86_64 0:20.10.2-3.el7 will be installed
--> Processing Dependency: fuse-overlayfs >= 0.7 for package: docker-ce-rootless-extras-20.10.2-3.el7.x86_64
--> Finished Dependency Resolution
Error: Package: docker-ce-rootless-extras-20.10.2-3.el7.x86_64 (docker-ce-stable)
Requires: fuse-overlayfs >= 0.7
You could try using --skip-broken to work around
I already tried
sudo rpm -Uvh http://mirror.centos.org/centos/7/extras/x86_64/Packages/fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm
Retrieving http://mirror.centos.org/centos/7/extras/x86_64/Packages/fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm
warning: /var/tmp/rpm-tmp.TZLjHD: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
error: Failed dependencies:
libfuse3.so.3()(64bit) is needed by fuse-overlayfs-0.7.2-6.el7_8.x86_64
libfuse3.so.3(FUSE_3.0)(64bit) is needed by fuse-overlayfs-0.7.2-6.el7_8.x86_64
libfuse3.so.3(FUSE_3.2)(64bit) is needed by fuse-overlayfs-0.7.2-6.el7_8.x86_64
Building on top of #user3495504's answer, what we did to fix the problem was adding an entry on top of the file /etc/yum.repos.d/docker-ce.repo, with this content:
[centos-extras]
name=Centos extras - $basearch
baseurl=http://mirror.centos.org/centos/7/extras/x86_64
enabled=1
gpgcheck=1
gpgkey=http://centos.org/keys/RPM-GPG-KEY-CentOS-7
Then the installation command:
yum -y install slirp4netns fuse-overlayfs container-selinux
was successful.
[Edit]
enabled gpgcheck
Had this problem too when trying to install Docker. This worked to get fuse-overlayfs
sudo yum install fuse3-devel
wget http://mirror.centos.org/centos/7/extras/x86_64/Packages/fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm
sudo yum localinstall fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm
I got the package url from http://mirror.centos.org/centos/7/extras/x86_64/Packages/
The next thing missing for me is slirp4netns >= 0.4. I'm going to try the same trick. And yes, that did work and the docker install went through
sudo yum install docker-ce docker-ce-cli containerd.io
I had this problem installing docker version 20 in Oracle Linux 7.9. Installing version 19 instead, there is no problem with dependencies and to install packages from CentOS Extras repository is not needed.
sudo yum install docker-ce-19.03.9 docker-ce-cli-19.03.9 containerd.io docker-compose-plugin
edit
To show all available versions
yum list docker-ce --showduplicates | sort -r
Install the fuse3 libs package. That would provide the missing dependencies. And then try the fuse overlay package before proceeding to the docker install

How to install ffmpeg on rhel7

whein i installing ffmpeg on RHEL,i got an error like this
> Error: Package: libavdevice-2.6.8-3.el7.nux.x86_64 (nux-dextop)
> Requires: libopenal.so.1()(64bit) Error: Package: ffmpeg-libs-2.6.8-3.el7.nux.x86_64 (nux-dextop)
> Requires: libva.so.1()(64bit) Error: Package: ffmpeg-2.6.8-3.el7.nux.x86_64 (nux-dextop)
> Requires: libvdpau.so.1()(64bit) Error: Package: libavdevice-2.6.8-3.el7.nux.x86_64 (nux-dextop)
> Requires: libSDL-1.2.so.0()(64bit) Error: Package: ffmpeg-libs-2.6.8-3.el7.nux.x86_64 (nux-dextop)
> Requires: libass.so.5()(64bit) Error: Package: ffmpeg-libs-2.6.8-3.el7.nux.x86_64 (nux-dextop)
> Requires: libschroedinger-1.0.so.0()(64bit) Error: Package: ffmpeg-2.6.8-3.el7.nux.x86_64 (nux-dextop)
> Requires: libSDL-1.2.so.0()(64bit
RHEL7 is not registered.
You can use one of the 3rd-party repositories that offer multimedia packages, such as negativo17 (which needs the regular EPEL repository enabled):
# yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# yum-config-manager --add-repo https://negativo17.org/repos/epel-multimedia.repo
# yum install ffmpeg
Btw, an unregistered installation of RHEL isn't a good idea -- no security updates, no easy installation of software, etc. I would suggest either buying a subscription, or using a free alternative, such as CentOS.
You can install ffmpeg on your rhel7 server using RPM.
sudo yum install -y https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
sudo yum install -y ffmpeg
After the install verify ffmpeg version
ffmpeg -version
For more information check the below link.
ffmpeg basic examples

Failed to install Varnish due to dependencies errors

I'm trying install varnish on CentOS 6.7 and get following errors. Can somebody help?
yum install varnish
.....
Finished Dependency Resolution
Error: Package: varnish-libs-4.1.0-1.el7.x86_64 (varnish-4.1)
Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: varnish-4.1.0-1.el7.x86_64 (varnish-4.1)
Requires: systemd-units
Error: Package: varnish-4.1.0-1.el7.x86_64 (varnish-4.1)
Requires: libpcre.so.1()(64bit)
Error: Package: varnish-4.1.0-1.el7.x86_64 (varnish-4.1)
Requires: libc.so.6(GLIBC_2.14)(64bit)
Error: Package: varnish-libs-4.1.0-1.el7.x86_64 (varnish-4.1)
Requires: libpcre.so.1()(64bit)
Error: Package: varnish-4.1.0-1.el7.x86_64 (varnish-4.1)
Requires: systemd-sysv
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
You will need to install varnish from source. Follow these steps:
https://www.varnish-cache.org/docs/trunk/installation/install.html#compiling-varnish-from-source
Start by downloading the tarball:
http://repo.varnish-cache.org/source/
Then install the packages listed:
yum install -y autoconf automake jemalloc-devel libedit-devel libtool ncurses-devel pcre-devel pkgconfig python-docutils python-sphinx graphviz
tar xzvf downloaded-filename.tar.gz
cd name-of-the-folder-from-tarball
sh autogen.sh
sh configure
make
make check
(go make some tea)
make install
Read the notes on starting the service: https://www.varnish-cache.org/docs/trunk/installation/install.html#compiling-varnish-from-source
I'm not allowed to comment but I've upvoted the answer above. I just used it to install Varnish 5.2 on Amazon Linux. The downside of this approach is that you don't get a nice tidy "sudo service varnish start" option, but the upside is that at least you've got Varnish 5.
One change to the answer above. The location of the source has changed. You'll find it here now:
http://varnish-cache.org/releases/

Resources