Unable to install node.js v8 on CentOS 7 - node.js

I tried following the instructions on nodesource by running these commands as root:
curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
yum install -y nodejs
But when I run node -v afterward I can see that it only installed 0.10.48. I can see in the output of the second command that it's selecting the wrong version of the package for download:
Loaded plugins: fastestmirror, priorities
Setting up Install Process
Loading mirror speeds from cached hostfile
* epel: mirror.steadfast.net
* remi: repo1.sea.innoscale.net
* remi-safe: repo1.sea.innoscale.net
2418 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 0:0.10.48-3.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=========================================================================================================================================================================================
Package Arch Version Repository Size
=========================================================================================================================================================================================
Installing:
nodejs x86_64 0.10.48-3.el6 epel 2.1 M
Transaction Summary
=========================================================================================================================================================================================
Install 1 Package(s)
Total download size: 2.1 M
Installed size: 7.1 M
Downloading Packages:
nodejs-0.10.48-3.el6.x86_64.rpm | 2.1 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : nodejs-0.10.48-3.el6.x86_64 1/1
Verifying : nodejs-0.10.48-3.el6.x86_64 1/1
Installed:
nodejs.x86_64 0:0.10.48-3.el6
Complete!
I've tried uninstalling with yum remove -y nodejs npm and then running rm -fv /etc/yum.repos.d/nodesource*, yum clean all, yum update and then reinstalling but nothing seems to work.
Why doesn't it resolve to the v8 package?

I had the same problem few days ago and I was not able to install Node version 8 via the nodesource repository.
In fact, there is no setup_8.x script in the rpm repository yet.
I end up with n package to get Node version 8:
# yum install nodejs // you need to have npm installed
# npm install -g n
# n stable
# node -v // v8.4.0

Related

npm: command not found centos 7

I am having centos 7 and already installed npm on my machine but when i try npm command its showing me error as
npm: command not found
[vinit#NL577 ~]$ sudo yum install npm
[sudo] password for vinit:
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
epel/x86_64/metalink | 3.5 kB 00:00:00
* base: repos.del.extreme-ix.org
* epel: repos.del.extreme-ix.org
* extras: repos.del.extreme-ix.org
* updates: repos.del.extreme-ix.org
adobe-linux-x86_64 | 3.0 kB 00:00:00
base | 3.6 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 3.4 kB 00:00:00
google-chrome | 1.3 kB 00:00:00
sublime-text | 2.9 kB 00:00:00
updates | 3.4 kB 00:00:00
Package 1:npm-3.10.10-1.6.16.0.1.el7.x86_64 already installed and latest version
Nothing to do
[vinit#NL577 ~]$ npm
bash: npm: command not found...
Update the system and install necessary packages
yum install curl sudo
Install Node.js and npm from the NodeSource repository
We will install Node.js v6 LTS and npm from the NodeSource repository which depends on the EPEL repository being available.
To enable the EPEL repository on your CentOS 7 VPS, issue the following command:
sudo yum install epel-release
Once the EPEL repository is enabled run the following command to add the Node.js v6 LTS repository:
curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash -
Once the NodeSource repository is enabled we can proceed with the Node.js v6 LTS and npm installation:
sudo yum install nodejs
If it doesn't work, try to uninstall NodeJs and repeat all actions.
sudo rm -rf /var/cache/yum
sudo yum remove -y nodejs
sudo rm /etc/yum.repos.d/nodesource*
sudo yum clean all
As mentioned in the comments, it seems odd to me to install npm as an individual package. Normally, npm comes bundled with Node.
To that end, I would remove any Node versions you have on the PC, then use a version manager to install the desired version of Node (and by default npm).
The version manager I have had the best experience with is nvm. You can find it here.
The TL;DR for installing nvm is:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
But I would encourage you to look at the project on GitHub and read its README. There is also a good tutorial on how to use it here.
Once you have nvm up and running, you can install Node thus:
nvm install node # "node" is an alias for the latest version
Or to install a specific version of node:
nvm install 6.14.4 # or 10.10.0, 8.9.1, etc
And then when you run npm, the command should be available in your $PATH.
Update yum
yum update -y
In redhat base OS (tested in centos 7)
yum install nodejs npm -y

dependency error while installing docker 1.12 in rhel 7

Aim: Install latest docker (v1.12) in rhel 7 in offline mode
I got dependency error while installing docker 1.12 in rhel 7, and I
tried to find those dependencies in internet but didn't found those
dependencies except selinux-policy rpm.
I tried to install after yum update.
I found dependencies of docker 1.7 on internet, installed in rhel 6.7
but could not make same way for docker 1.12 in rhel 7
I tried below things
Installed docker 1.12 when system(test machine) is connected to internet and after installing docker 1.12 all dependencies will cache in /var/cahce/yum/rhel7/ location and search for above dependencies but didn't found.
Crated local yum repo and mounted iso file and then did yum update
and tried to install docker but still give same dependencies error.
I'm not sure how above steps are correct or right procedure, I just tired but anything didn't work.
my production environment does not have internet connection and it has only intranet connection only.
Can some one provide or advice me how to solve this and how to proceed this kind of problems?
Thanks in advance!
I'm kind of surprised you can't find at least the non-docker packages here as these come from standard CentOS repositories. In general, I'd use something like:
# yum provides "*/<filename>"
e.g.
# yum provides "*/libsystemd.so.*"
This obviously won't help if you've not configured the repositories on your target system, but it's pretty easy to run a Vagrant VM and see what's required there.
$ vagrant init bento/centos-7.2
$ vagrant ssh
then follow the docs at https://docs.docker.com/engine/installation/linux/centos/:
$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF'
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
EOF
and install it:
$ sudo yum install docker-engine
On mine, this gives:
[vagrant#localhost ~]$ sudo yum install docker-engine
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.ukhost4u.com
* extras: mirror.vorboss.net
* updates: mirror.vorboss.net
Resolving Dependencies
--> Running transaction check
---> Package docker-engine.x86_64 0:1.12.1-1.el7.centos will be installed
--> Processing Dependency: docker-engine-selinux >= 1.12.1-1.el7.centos for package: docker-engine-1.12.1-1.el7.centos.x86_64
--> Processing Dependency: libseccomp.so.2()(64bit) for package: docker-engine-1.12.1-1.el7.centos.x86_64
--> Processing Dependency: libltdl.so.7()(64bit) for package: docker-engine-1.12.1-1.el7.centos.x86_64
--> Running transaction check
---> Package docker-engine-selinux.noarch 0:1.12.1-1.el7.centos will be installed
---> Package libseccomp.x86_64 0:2.2.1-1.el7 will be installed
---> Package libtool-ltdl.x86_64 0:2.4.2-21.el7_2 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================
Package Arch Version Repository Size ============================================================================================================
Installing:
docker-engine x86_64 1.12.1-1.el7.centos dockerrepo 19 M Installing for dependencies:
docker-engine-selinux noarch 1.12.1-1.el7.centos dockerrepo 28 k libseccomp x86_64 2.2.1-1.el7 base 49 k libtool-ltdl x86_64 2.4.2-21.el7_2 updates 49 k
Transaction Summary
============================================================================================================
Install 1 Package (+3 Dependent packages)
Total download size: 19 M
Installed size: 79 M
Running that yum provides command I gave above shows you that e.g. libsystemd.so* is in the systemd-libs package and available in the "updates" repo .. see http://mirror.centos.org/centos/7/updates/x86_64/Packages/
Try this command:
yum install libtool-ltdl
After this re-run installation command.
This will be done automatically, if you have "docker-ce" repository.
Good luck!

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

Error Installing phpmyadmin on CentOS

I get the this error when i try yo install phpmyadmin on CentOS 6.5 VPS using this.
COMMAND :
sudo yum install phpmyadmin
ERROR :
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.solarvps.com
* epel: epel.mirror.constant.com
* extras: mirror.wiredtree.com
* rpmforge: repoforge.mirror.constant.com
* updates: mirrors.lga7.us.voxel.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpmyadmin.noarch 0:2.11.11.3-2.el6.rf will be installed
--> Processing Dependency: php-mbstring >= 4.1.0 for package: phpmyadmin-2.11.11.3-2.el6.rf.noarch
--> Running transaction check
---> Package php-mbstring.x86_64 0:5.3.3-27.el6_5 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-27.el6_5 for package: php-mbstring-5.3.3-27.el6_5.x86_64
--> Finished Dependency Resolution
Error: Package: php-mbstring-5.3.3-27.el6_5.x86_64 (updates)
Requires: php-common(x86-64) = 5.3.3-27.el6_5
Installed: php-common-5.4.30-1.el6.remi.x86_64 (#remi)
php-common(x86-64) = 5.4.30-1.el6.remi
Available: php-common-5.3.3-26.el6.x86_64 (base)
php-common(x86-64) = 5.3.3-26.el6
Available: php-common-5.3.3-27.el6_5.x86_64 (updates)
php-common(x86-64) = 5.3.3-27.el6_5
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Somebody please Help. Thanx in advance
You've installed a more recent PHP version (5.4.30-1) from another source (#remi) than the officials (base) repository provides. Now you're trying to install the phpMyAdmin package, which depends on php-mbstring. php-mbstring is the actual problem here -- it's being automatically installed because phpmyadmin depends on it, but the version you're attempting to install isn't compatible with the rest of your PHP installation.
The solution is easy, though, since remi also provides phpmyadmin (quite a bit more recent version than you're attempting to install, too!). Just install phpmyadmin and php-common from the remi repository like you installed PHP. There are some instructions at http://blog.famillecollet.com/pages/Config-en if you forgot, but you managed to install the upgraded PHP already so you should be able to get the remi phpmyadmin installed pretty easily.
OR....
Download phpMyAdmin from http://www.phpmyadmin.net and uncompress it to your web root and forget about the package. php-mbstring isn't strictly required to run the application anyway, so you don't even need to worry about that part as long as you meet the other requirements.
You installed php5.4 from remi repository.
phpmyadmin needs php to work; but you are installing phpmyadmin from the official repository and that phpmyadmin version needs php5.3.
I guess you don't want to go back to php5.3, so just run this command:
yum --enablerepo=remi install phpmyadmin
If you didn't add remi repositories to you CentOS, you will have to previously run:
sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

How can I solve this Sphinx search dependency issue?

I'm trying to install Sphinx search on a CentOS VPS via SSH but I keep getting dependency issues that I can't seem to resolve.
Here's the OS I'm using:
cat /etc/redhat-release
CentOS 6.4 (Final)
uname -a
Linux host.example.com 2.6.32-042stab074.10 #1 SMP Fri Mar 1 09:18:44 MSK 2013 i686 i686 i386 GNU/Linux
This to me looks like I need the 32-bit CentOS 6 rpm so I tried to install it with this command:
sudo yum install http://sphinxsearch.com/files/sphinx-2.0.8-1.rhel6.i386.rpm
but I get the following error message:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.advancedhosters.com
* extras: centos.mirror.constant.com
* updates: mirror.lug.udel.edu
base | 3.7 kB 00:00
extras | 3.5 kB 00:00
updates | 3.4 kB 00:00
Setting up Install Process
sphinx-2.0.8-1.rhel6.i386.rpm | 5.6 MB 00:30
Examining /var/tmp/yum-root-oMekz6/sphinx-2.0.8-1.rhel6.i386.rpm: sphinx-2.0.8-1.rhel6.i386
Marking /var/tmp/yum-root-oMekz6/sphinx-2.0.8-1.rhel6.i386.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package sphinx.i386 0:2.0.8-1.rhel6 will be installed
--> Processing Dependency: libmysqlclient.so.16 for package: sphinx-2.0.8-1.rhel6.i386
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16) for package: sphinx-2.0.8-1.rhel6.i386
--> Finished Dependency Resolution
Error: Package: sphinx-2.0.8-1.rhel6.i386 (/sphinx-2.0.8-1.rhel6.i386)
Requires: libmysqlclient.so.16
Error: Package: sphinx-2.0.8-1.rhel6.i386 (/sphinx-2.0.8-1.rhel6.i386)
Requires: libmysqlclient.so.16(libmysqlclient_16)
You could try using --skip-broken to work around the problem
** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
frontpage-2002-SR1.2.i386 has missing requires of libexpat.so.0
sendmail-cf-8.14.4-8.el6.noarch has missing requires of sendmail = ('0', '8.14.4', '8.el6')
No matter what I try I always seem to be missing libmysqlclient.so.16.
Any idea where I can find this package?
yum install mysql-devel
should do it.
Install the remi repository:
[http://blog.famillecollet.com/pages/Config-en]
Enterprise Linux 6 (with EPEL) i386 or x86_64
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
then install compat-mysql51
yum --enablerepo=remi install compat-mysql51
then install sphinx from the rpm downloaded
yum localinstall sphinx-2.1.2-1.rhel6.SYSTEM-VERSION.rpm
Use the SphinxSearch docker files (docker hub link) to easily install SphinxSearch.
Grab it:
docker pull leodido/sphinxsearch:latest
If you want to see how to compile from source (which I recommend as the better mode to install SphinxSearch), look into them - e.g., here.

Resources