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?

How to install ruby(rbenv) and npm on WSL2 as Ubuntu

Last updated at Posted at 2024-06-26

apt でインストールしたらやたら古かったのでメモ

環境

  • Windows 11 Pro
  • wsl 2.2.4.0
  • Ubuntu 22.04.4 LTS

TODO

# rbenv and ruby

sudo apt-get install -y libssl-dev zlib1g-dev libyaml-dev
git clone --depth 1 https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'eval "$(~/.rbenv/bin/rbenv init - bash)"' >> ~/.bashrc
. ~/.bashrc

git clone --depth 1 \
  https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build 

rbenv install 3.3.1
rbenv global 3.3.1
gem update --system
gem update
gem cleanup

# npm and nodejs

curl -fsSL https://deb.nodesource.com/setup_20.x | \
  sudo -E bash - && sudo apt-get install -y nodejs

参考にしたサイト

Ubuntu 22.04LTSへのNode.js 20のインストール - Jaybanuan's Blog

0
0
1

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?