在Debian系統中,您可以使用以下步驟來更新Node.js:
首先,打開終端(快捷鍵:Ctrl + Alt + T)。
更新您的系統包列表:
sudo apt update
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
如果您需要安裝其他版本,請將setup_14.x替換為相應的版本號,例如setup_12.x。
sudo apt install -y nodejs
node --version
npm --version
現在,您已經成功地在Debian系統中更新了Node.js。如果您需要更新到其他版本,只需重復上述步驟并選擇所需的版本。