Ubuntu에서 Node.js + 패키지 매니저(npm, yarn/pnpm)까지 가장 깔끔하게 설치하는 가장 쉬운 방법을 단계별로 정리해줄게.
지금 상황에선 Codex CLI용 Node.js 설치가 목적이니까 Node Version Manager(nvm)로 설치하는 방법이 가장 좋다.
(삭제/업데이트도 쉽고, 충돌 없음)
Ubuntu에서 Node.js를 설치할 때 가장 권장되고 간단한 방법은 NVM을 쓰는 것이다.
sudo apt update
sudo apt install curl -y
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
nvm --version
Codex CLI는 Node.js 18+ 권장하므로 최신 LTS(24.x) 설치 추천.
nvm install --lts
Node 버전 확인:
node -v
npm -v
sudo apt update
sudo apt install curl -y
# NVM 설치
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
source ~/.bashrc
# Node.js + npm 설치
nvm install --lts
ㄴ 여기까지 하면 됨.
# yarn & pnpm (선택)
npm install -g yarn pnpm
https://developers.openai.com/codex/cli/
Node.js 설치 후:
npm i -g @openai/codex
확인:
codex --version