0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

UbuntuServerにNode.jsをインストール(一撃)

Posted at

UbuntuServerにNode.jsを入れようとしたら
時間かかったのでポイントを記録することにした。

使用サーバー

Ubuntu24.04.1 LTS

問題箇所

bash
sudo apt install -y node.js

このコマンドでインストールしようとしたけど
「Unable to locate package node.js」
「Couldn't find any package by glob 'node.js'」
と表示されインストールできない。
困った、、、

Node.jsのインストール方法

Ubuntu24.04.1 LTS

どのUbuntuServerを使っているのかわからん人は
下のコードをターミナルに入力。

bash
cat /etc/issue

本題。
Ubuntu24.04.1 LTSを使っている人ならこの
コマンドで一発解決!

bash
sudo snap install node --clasic

念のためにバージョン確認をする。

bash
node -v
bash
npm -v

いずれも
「v20.18.1」「10.8.2」
と表示されて無事インストール完了!
ホームディレクトリに戻って、以下のコマンドを入力

bash
ls

snapが作られているはずです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?