Reputation: 426
I am trying to install nodejs.rpm in Centos 7 using rpm installer. Referred this link. Downloaded rpm binary package from referred link here.
The files downloaded and available in my local directory. Then execute the following command
rpm -ivh nodejs-10.13.0-2.el7.x86_64.rpm
End up in the following error
warning: nodejs-10.13.0-2.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID ac25decd: NOKEY
error: Failed dependencies:
http-parser >= 2.7.0 is needed by nodejs-1:10.13.0-2.el7.x86_64
libcrypto.so.1.1()(64bit) is needed by nodejs-1:10.13.0-2.el7.x86_64
libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) is needed by nodejs-1:10.13.0-2.el7.x86_64
libhttp_parser.so.2()(64bit) is needed by nodejs-1:10.13.0-2.el7.x86_64
libnghttp2.so.14()(64bit) is needed by nodejs-1:10.13.0-2.el7.x86_64
libnghttp2_14_17_1 >= 1.34.0 is needed by nodejs-1:10.13.0-2.el7.x86_64
libssl.so.1.1()(64bit) is needed by nodejs-1:10.13.0-2.el7.x86_64
libssl.so.1.1(OPENSSL_1_1_0)(64bit) is needed by nodejs-1:10.13.0-2.el7.x86_64
libuv >= 1:1.23.2 is needed by nodejs-1:10.13.0-2.el7.x86_64
libuv.so.1()(64bit) is needed by nodejs-1:10.13.0-2.el7.x86_64
npm = 1:6.4.1-1.10.13.0.2.el7 is needed by nodejs-1:10.13.0-2.el7.x86_64
I appreciate any help to resolve this warning and error. Thanks in advance.
Upvotes: 0
Views: 1994
Reputation: 426
I used YUM repository to satisfied dependency chain of installing nodejs in centos 7.
When I tried to install using yum command doesn't download all dependencies automatically still few dependency error occurred.
yum install nodejs-10.13.0-2.el7.x86_64.rpm
To resolve this:
Then run this command to create repodata directory automatically inside A.
createrepo A
Create a repository file named(local.repo) in path /etc/yum.repos.d
[NodeUpgrade]
name=Node Version Upgrade - NodeUpgrade
baseurl=file:///A
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
NodeUpgrade is repository name. This can be listed when execute command
yum repolist
repo id repo name status
NodeUpgrade Node Version Upgrade - NodeUpgrade 7
debuginfo debuginfo 3160
Install using yum:
sudo yum install nodejs
List available nodejs to find nodejs installed and make sure the repo name matches with the one specified in local.repo
yum info nodejs
Installed Packages
Name : nodejs
Arch : x86_64
Epoch : 1
Version : 10.13.0
Release : 2.el7
Size : 27 M
Repo : installed
From repo : NodeUpgrade
Summary : JavaScript runtime
URL : http://nodejs.org/
License : MIT and ASL 2.0 and ISC and BSD
Description : Node.js is a platform built on Chrome's JavaScript
: runtime for easily building fast, scalable network
: applications. Node.js uses an event-driven,
: non-blocking I/O model that makes it lightweight and
: efficient, perfect for data-intensive real-time
: applications that run across distributed devices.
Thanks for your suggestion @Chris Maes. I hope this explanation will bring a clear picture.
Upvotes: 0
Reputation: 37802
You have two options:
rpm -ivh *.rpm
yum
or dnf
that manages all dependencies for you. I would suggest you to try running simply yum install nodejs8
or even yum install ./nodejs-10.13.0-2.el7.x86_64.rpm
if you really want to install the exact version that you downloaded.Upvotes: 1