So installieren Sie Node.js unter Ubuntu 22.04 LTS
Node.js ist eine JavaScript-Laufzeitumgebung und basiert auf der V8-JavaScript-Engine von Chrome. In diesem Ubuntu 22.04 LTS Im Tutorial-Beitrag zeigen wir Ihnen die einfache Möglichkeit, Node.js unter Ubuntu 22.04 LTS zu installieren. Es gibt mehrere Möglichkeiten, Node.js unter Ubuntu 22.04 LTS zu installieren. Node.js Version 12.22.9 ist in Ubuntu 22.04 LTS enthalten.
So installieren Sie Node.js unter Ubuntu 22.04 LTS
So installieren Sie Node.js und npm auf U…
Bitte aktivieren Sie JavaScript
So installieren Sie Node.js und npm unter Ubuntu 22.04
Methode 1:
1. Installieren Sie Node unter Ubuntu mit dem Node Version Manager
Bei dieser Methode installieren wir Node.js unter Ubuntu 22.04 mit dem Node-Versionsmanager. Führen Sie die folgenden Befehle aus, um den Node Version Manager zunächst in Ubuntu 22.04 LTS zu installieren.
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
Quelle deine .bashrc
Datei:
source ~/.bashrc
Führen Sie nun den folgenden Befehl aus, um Node unter Ubuntu mit NVM oder Node Version Manager zu installieren.
nvm install v16.15.0
Node.js 16.15.0 ist die neueste verfügbare stabile Version.
Methode 2:
2. Installieren Sie Node unter Ubuntu mit Apt aus den Standard-Repositorys
Aktualisieren Sie in Ihrem Ubuntu zunächst Ihren lokalen Paketindex mit dem folgenden Befehl:
sudo apt update
Installieren Sie nun node.js mit dem folgenden Befehl:
sudo apt install nodejs
Folgen Sie den Anweisungen auf dem Bildschirm und führen Sie den folgenden Befehl aus, wenn Sie den Paketmanager von node.js installieren möchten:
sudo apt install npm
3. Installieren Sie Node unter Ubuntu mit Apt mithilfe eines NodeSource-PPA
Sie fragen sich bestimmt, warum wir die Installation von Node unter Ubuntu mit NodeSource PPA empfehlen. Der Grund ist einfach, da in NodeSource-PPAs mehr Versionen von Node.js verfügbar sind als in den offiziellen Ubuntu-Repositories.
Run the following command to add NodeSource PPA. cd ~ curl -sL https://deb.nodesource.com/setup_17.x -o nodesource_setup.sh sudo bash nodesource_setup.sh
Installieren Sie nun node.js mit:
sudo apt install nodejs
.uae7550d4ace6b1838071c46ddc5ce691{padding:0;margin:0;padding-top:1em!important;padding-bottom:1em!important;width:100%;display:block;font-weight:700;background-color:#eaeaea;border :0!important;border-left:4px solid #34495e!important;box-shadow:0 1px 2px rgba(0,0,0,.17);-moz-box-shadow:0 1px 2px rgba(0,0 ,0,.17);-o-box-shadow:0 1px 2px rgba(0,0,0,.17);-webkit-box-shadow:0 1px 2px rgba(0,0,0,.17) ;text-decoration:none}.uae7550d4ace6b1838071c46ddc5ce691:active,.uae7550d4ace6b1838071c46ddc5ce691:hover{opacity:1;transition:opacity 250ms;webkit-transition:opacity 250ms;text-decoration:none} .uae7550d4ace6b1838071c46ddc5ce691{transition:background-color 250ms;webkit -transition:background-color 250ms;opacity:1;transition:opacity 250ms;webkit-transition:opacity 250ms}.uae7550d4ace6b1838071c46ddc5ce691 .ctaText{font-weight:700;color:#464646;text-decoration:none;font-size: 16px}.uae7550d4ace6b1838071c46ddc5ce691 .postTitle{color:#000;text-decoration:underline!important;font-size:16px}.uae7550d4ace6b1838071c46ddc5ce691:hover .postTitle{text-decoration:underline!important} LESEN Sie weitere relevante Dinge: So beheben Sie das Problem Fehler „Kein Installationskandidat“ in Ubuntu 22.04 LTS