-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Repository Manual Installation
We wish to notify our users that we will no longer release new versions in the previous repository. Commencing immediately, all future updates and versions will be published to the new repository. This move aims to enhance our development pipeline and ensure smoother updates' distribution. For a seamless transition, users will need to adjust certain configurations. We're grateful for your continued trust and cooperation.
For a more straightforward and convenient installation, we highly recommend using the scripts available in the main README of the repository. These scripts automate the migration process, making it more efficient and less prone to errors.
However, if you prefer a manual approach or wish to understand the process in detail, the following guide is available:
-
Remove Old Repository Configurations:
# Remove the GPG keyring file associated with the old repository sudo rm /etc/apt/keyrings/nodesource.gpg # Remove the old repository's list file sudo rm /etc/apt/sources.list.d/nodesource.list
-
Initialize the New Repository:
# Define the desired Node.js major version NODE_MAJOR=18 # Update local package index sudo apt-get update # Install necessary packages for downloading and verifying new repository information sudo apt-get install -y ca-certificates curl gnupg # Create a directory for the new repository's keyring, if it doesn't exist sudo mkdir -p /etc/apt/keyrings # Download the new repository's GPG key and save it in the keyring directory curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg # Add the new repository's source list with its GPG key for package verification echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
-
Install Node.js:
# Update local package index to recognize the new repository sudo apt-get update # Install Node.js from the new repository sudo apt-get install -y nodejs
-
Remove Old Repository Configurations:
# Remove the old repository's configuration files sudo rm /etc/yum.repos.d/nodesource*.repo
-
Initialize the New Repository:
# Define the desired Node.js major version NODE_MAJOR=18 # Install the new repository's RPM package sudo yum install https://rpm.nodesource.com/pub_${NODE_MAJOR}.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y
-
Install Node.js:
# Install Node.js from the new repository sudo yum install nodejs -y
Should you need further assistance, feel free to contact our support team.