Installing Node.js with yum on Amazon CentOS - libssl error - node.js

We are using CentOS as elastic build agent for Bamboo on demand.
Recently we utilized grunt for processing our JavaScript files. So I am trying to install npm and grunt in startup script.
Original solution was taken from https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
curl -O http://download-i2.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
sudo yum install npm --enablerepo=epel
npm install -g grunt
npm install -g grunt-cli
And it worked for some time. But later it start fail on yum with error related to missed libssl.so.10.
I checked and libssl.so.10 present in the system.
yum install libssl.so.10 ->
Package openssl-1.0.0g-1.26.amzn1.i686 already installed and latest version
Nothing to do
yum install libcrypto.so.10 ->
Package openssl-1.0.0g-1.26.amzn1.i686 already installed and latest version
Nothing to do
yum install nodejs ->
Error: Package: nodejs-0.10.24-1.el6.i686 (epel)
Requires: libcrypto.so.10(libcrypto.so.10)
Error: Package: nodejs-0.10.24-1.el6.i686 (epel)
Requires: libssl.so.10(libssl.so.10)
The most interesting part that on the same machine I absolutely successfully compiled nodes from sources using
git clone http://github.com/joyent/node.git
cd node
./configure
make
make install
Eventually it takes too long to make nodejs upon each elastic agent start. So I am still seeking for a way to install node.js with yum. Can you provide any ideas about directions to evaluate?
Maybe there is some other way to install npm and grunt at CentOS?

How did you remove the node.js when it started giving you problems? Try force remove the ssl and crypto packages and reinstalled them.
yum remove libssl.so.10
yum remove libcrypto.so.10
yum install libssl.so.10
yum install libcrypto.so.10
It sounds like your library files are not there when you get the errors but the rpm itself is installed. You have to remove the rpm first before you can reinstall.

Related

Install Chrome/Cromium on Amazon Linux v2 (ARM64/aarch64/Gravitone)

Does anyone know a working solution to install Google Chrome(Chromium) on Amazon Linux 2 with ARM64 architecture (Gravitone c6g.xlarge instance)? I need to run it in headless mode.
At the moment I can't find any packages in yum:
No package chromium available.
When I try to install it using the RPM package I get the error:
Error: Package: chromium-87.0.4280.141-1.el8.aarch64 (/chromium-87.0.4280.141-1.el8.aarch64)
Requires: libm.so.6(GLIBC_2.27)(64bit)
Error: Package: chromium-87.0.4280.141-1.el8.aarch64 (/chromium-87.0.4280.141-1.el8.aarch64)
Requires: libz.so.1(ZLIB_1.2.9)(64bit)
Error: Package: chromium-87.0.4280.141-1.el8.aarch64 (/chromium-87.0.4280.141-1.el8.aarch64)
Requires: chromium-common(aarch-64) = 87.0.4280.141-1.el8
Error: Package: chromium-87.0.4280.141-1.el8.aarch64 (/chromium-87.0.4280.141-1.el8.aarch64)
Requires: libc.so.6(GLIBC_2.28)(64bit)
When I try to run sudo yum install glibc I get:
glibc-2.26-39.amzn2.aarch64
Looks like Amazon Linux has installed own older version of glibc. Same situation with zlib package, available older version:
zlib-1.2.7-18.amzn2.aarch64
To really solve the problem if you are using EC2 instance or any other server where you are running Amazon linux, you should follow the below steps .
Enable and install Extra Packages for Enterprise Linux by running the command
sudo amazon-linux-extras install epel -y
Post installing all the extra packages successfully, Install chromimum as usual
sudo yum install -y chromium
Once you do that Chromium will have all required such as libatk* libgdk* etc ...
You should be able to easily launch Chromium
The missed out packages that you are looking here, are actually not missedout they are kind of default you just have to enable them , this is well documented in AWS documentation .
https://aws.amazon.com/premiumsupport/knowledge-center/ec2-enable-epel/

libcouchbase not instaling on Red Hat Enterprise Linux Server release 6.6

Following the documentation for RHEL/CentOS, this is how I try to install libcouchbase:
wget http://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-6-x86_64.rpm
sudo rpm -iv couchbase-release-1.0-6-x86_64.rpm
sudo yum install libcouchbase-devel libcouchbase2-bin gcc gcc-c++
However libcouchbase-devel and libcouchbase2-bin fail with:
Running rpm_check_debug
Running Transaction Test
Transaction Check Error:
file /usr/lib64/libcouchbase.so.2.0.65 conflicts between attempted installs of libcouchbase-2.10.3-1.el6.remi.x86_64 and libcouchbase2-core-2.10.3-1.el6.x86_64
Error Summary
-------------
I tried installing those packages one at a time but, if I install libcouchbase-devel first it succeeds and libcouchbase2-bin fail. If I remove what I installed and do libcouchbase2-bin first it succeeds, but thenlibcouchbase-devel` fails.
This clearly points to a conflict somewhere, but I am unsure what this conflict is exactly
I removed all packages that have couchbase in their name: yum remove packagename
Then, yum install libcouchbase libcouchbase-devel

mapr: Install mapr-zookeeper-5.0.0 manually

I want to install mapr-zookeeper-5.0.0.32987 through commandline manually, but when i provide version to yum install mapr-zookeeper-5.0.0.32987, it's giving me No package available error.
How to install mapr-zookeeper-5.0.0 since i can't use "yum install mapr-zookeeper" since it will install mapr-zookeeper-5.1.0
Just download
http://archive.mapr.com/releases/v5.0.0/redhat/mapr-zk-internal-5.0.0.32987.GA.v3.4.5-1.x86_64.rpm
and
http://archive.mapr.com/releases/v5.0.0/redhat/mapr-zk-internal-5.0.0.32987.GA.v3.4.5-1.x86_64.rpm
and install using rpm
rpm -i mapr-zk-internal-5.0.0.32987.GA.v3.4.5-1.x86_64.rpm mapr-zk-internal-5.0.0.32987.GA.v3.4.5-1.x86_64.rpm

centOS can't install nodejs via yum

I was using node v0.10.x on my centOS server and I want to update node.js, so followed some articles. First removing currently installed:
# which node
# cd /usr
# rm -r bin/node bin/node-waf include/node lib/node lib/pkgconfig/nodejs.pc share/man/man1/node.1
and then check node -v is not working, good. But using yum doesn't install latest Node.js, so I searched some post and found this:
https://www.metachris.com/2015/10/how-to-install-nodejs-5-on-centos-and-ubuntu/
so I followed commands:
# rpm -Uvh https://rpm.nodesource.com/pub_5.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm
# yum install nodejs -y
and this is the problem. it prints numerous errors and keeps failing.
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 0:0.10.42-4.el6 will be updated
--> Processing Dependency: nodejs(x86-64) = 0.10.42-4.el6 for package: nodejs-devel-0.10.42-4.el6.x86_64
---> Package nodejs.x86_64 0:5.11.1-1nodesource.el7.centos will be an update
--> Running transaction check
---> Package nodejs-devel.x86_64 0:0.10.42-4.el6 will be updated
---> Package nodejs-devel.x86_64 0:5.11.1-1nodesource.el7.centos will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
nodejs x86_64 5.11.1-1nodesource.el7.centos nodesource 8.7 M
Updating for dependencies:
nodejs-devel x86_64 5.11.1-1nodesource.el7.centos nodesource 7.6 M
Transaction Summary
================================================================================
Upgrade 1 Package (+1 Dependent package)
Total size: 16 M
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction check error:
file /usr/lib/node_modules/npm/node_modules/semver/package.json from install of nodejs-5.11.1-1nodesource.el7.centos.x86_64 conflicts with file from package nodejs-semver-2.1.0-1.el6.noarch
file /usr/lib/node_modules/npm/node_modules/semver/bin/semver from install of nodejs-5.11.1-1nodesource.el7.centos.x86_64 conflicts with file from package nodejs-semver-2.1.0-1.el6.noarch
file /usr/lib/node_modules/npm/node_modules/semver/semver.js from install of nodejs-5.11.1-1nodesource.el7.centos.x86_64 conflicts with file from package nodejs-semver-2.1.0-1.el6.noarch
... and keeps going on ...
Also before remove node, I also did this:
# npm cache clean -f
# npm install -g n
# n stable
but this isn't working at all, because always saying version 0.10.x, even downloaded latest one! ( I sawed 6.2.2 or something )
I think something messed up on my server and I don't know how to fix this. Can anyone gimme some advice? Also If can, I want to install latest Node.js.
Install Node from the EPEL Repository
yum update
yum install epel-release
yum install nodejs
node --version
To access npm to manage their Node packages.
yum install npm
The easiest way is to use nvm, the "Node Version Manager".
In a shell, do:
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
Note: If you want to understand the script before running it, read the docs on nvm github page and/or remove | bash from the curl command to read without running the .sh file
Close and re-open shell to use updated profile. Then:
//prints "nvm" if correctly installed
$ command -v nvm
// install latest version of node
$ nvm install node
//check it's installed correctly
$ node -v
v12.6.0
After failing with other methods, this one had no issues.
First, you must install epe-release
sudo yum install epel-release
After, you can install node.js and npm
sudo yum -y install nodejs npm
Its worked for me.
I spent a while on this on a Fedora 35 workstation (upgraded from Fedora 34),
$ yum repolist
nodesource Node.js Packages for Fedora Linux 34 - x86_64
it gave me
$ node --version v12.22.1
None up the installers made a difference until I found this explanation:
How To Install Node.js on Fedora 36/35/34
The tutorial includes 3 methods. It's the third one that worked for me.
Install Node.js on Fedora via NVM
First, install the NVM tool on your system by running the following command:
$ curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
Then, reload the system environment using this command. It will set the required environment variables to use nvm on the system.
$ source ~/.bashrc
$ nvm install v16.14
Downloading and installing node v16.14.2...
$ node --version
v16.14.2

NodeJS install error on CentOs 6.3

I had Node.js installed on my server. Yesterday, I deleted it with yum erase nodejs and now I'm trying to install the new Node.js. I've tried yum install nodejs-compat-symlinks npm but it ends with the error:
Running rpm_check_debug
Running Transaction Test
Transaction Check Error:
file /usr/bin/node conflicts between
attempted installs of nodejs-compat-symlinks-1-1.el6.noarch and
nodejs-0.10.5-3.el6.x86_64
file /usr/include/node conflicts between
attempted installs of nodejs-compat-symlinks-1-1.el6.noarch and
nodejs-devel-0.10.5-3.el6.x86_64
How I may install Node.js on server now?
P.S. I installed Node.js with this manual:
wget
http://patches.fedorapeople.org/oldnode/repocfg/el/nodejs-stable-release.noarch.rpm
yum localinstall --nogpgcheck nodejs-stable-release.noarch.rpm
Edit /etc/yum.repos.d/nodejs-stable.repo. Comment out the mirrorlist
and use for [nodejs-stable] the baseurl:
baseurl=http://patches.fedorapeople.org/oldnode/stable/el$releasever/$basearch/
and for [nodejs-stable-source] also comment out the mirrorlist and use
for [nodejs-stable-source] the baseurl:
baseurl=http://patches.fedorapeople.org/oldnode/stable/el$releasever/SRPMS/
It looks like you have a conflicting package that you didn't erase with Node when you ran yum erase nodejs. nodejs-devel-0.10.5-3.el6.x86_64 is a completely separate package.
http://pkgs.org/centos-6-rhel-6/epel-testing-x86_64/nodejs-0.10.9-1.el6.x86_64.rpm.html
http://pkgs.org/centos-6-rhel-6/epel-testing-x86_64/nodejs-devel-0.10.9-1.el6.x86_64.rpm.html
Try running yum erase nodejs-devel, and then try to yum install nodejs-compat-symlinks npm again.

Resources