Linux completely removes node.js and reinstalls it through the yum command

Linux completely removes node.js and reinstalls it through the yum command

first step

Delete it once with the built-in package management

	yum remove nodejs npm -y

Manually delete the leftovers

  • Go to /usr/local/lib and delete all node and node_modules folders
  • Go to /usr/local/include and delete all node and node_modules folders
  • Enter /usr/local/bin and delete the executable file of node

Install the latest xz package from nodejs official website

	# Download wget https://nodejs.org/dist/v10.13.0/node-v10.13.0-linux-x64.tar.xz
	
	# Unzip xz -d node-v9.8.0-linux-x64.tar.xz
	tar -xvf node-v9.8.0-linux-x64.tar
	
	# Enter the directory cd node-v10.13.0-linux-x64/
	
	# Create a soft link ln -s /opt/nodejs/node-v10.13.0-linux-x64/bin/node /usr/local/bin/node
	ln -s /opt/nodejs/node-v10.13.0-linux-x64/bin/npm /usr/local/bin/npm
	
	# Test node -v
	npm -v
	
	# Configure taobao image npm config set registry https://registry.npm.taobao.org

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • How to install node.js development environment in Linux
  • How to Install Node.js on Linux
  • Install node.js in linux using package manager

<<:  Solution to MySQL connection exception and error 10061

>>:  The way to represent colors in HTML is by using 6-digit hexadecimal codes, RGB or keywords.

Recommend

Analyze the selection problem of storing time and date types in MySQL

In general applications, we use timestamp, dateti...

A brief discussion on MySQL count of rows

We are all familiar with the MySQL count() functi...

Solution to 404 Problem of Tomcat Installation in Docker

Find the containerID of tomcat and enter the toma...

js to make a simple calculator

This article shares the specific code of making a...

javascript input image upload and preview, FileReader preview image

FileReader is an important API for front-end file...

Docker learning: the specific use of Container containers

Container is another core concept of Docker. Simp...

How to modify the group to which a user belongs in Linux

Modify the group to which a user belongs in Linux...

Detailed explanation of the transition attribute of simple CSS animation

1. Understanding of transition attributes 1. The ...

CSS horizontal centering and limiting the maximum width

A CSS layout and style question: how to balance h...

How to use Font Awesome 5 in Vue development projects

Table of contents Install Dependencies Configurat...

A brief analysis of MySQL's WriteSet parallel replication

【Historical Background】 I have been working as a ...