[Rocky9] 安裝node.js 18, node.js 20
分享完整連結 //n.sfs.tw/m10935
分享連結 [Rocky9] 安裝node.js 18, node.js 20@精讚(文章歡迎轉載,請尊重版權註明連結來源)
2024-04-15 15:28:22 By 張○○
原本的nodejs16在使用 quasar dev時出現錯誤,得升級成18版以上。
查看 node js的版本
# node -v
移除原有node.js
# dnf remove nodejs
查看目前提供的版本
# dnf module list nodejs
Rocky Linux 9 - AppStream
Name Stream Profiles Summary
nodejs 18 [e] common [d] [i], development, minimal, s2i Javascript runtime
nodejs 20 common [d], development, minimal, s2i Javascript runtime
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
安裝18 版
# dnf module install nodejs:18/commin
安裝 20 版
# dnf module install nodejs:20/commin
錯誤排除
如果安裝時出現這樣的錯誤
The operation would result in switching of module 'nodejs' stream '18' to stream '20'
Error: It is not possible to switch enabled streams of a module unless explicitly enabled via configuration option module_stream_switch.
It is recommended to rather remove all installed content from the module, and reset the module using 'dnf module reset <module_name>' command. After you reset the module, you can install the other stream.
請清空 dnf的設定
# dnf module reset nodejs
Dependencies resolved.
========================================================================================================================
Package Architecture Version Repository Size
========================================================================================================================
Disabling module profiles:
nodejs/common
Resetting modules:
nodejs
Transaction Summary
========================================================================================================================
再安裝即可
# dnf module install nodejs:20/common
相關連結
https://nodejs.org/en/download/package-manager/all#centos-fedora-and-red-hat-enterprise-linux
[地理] 澳洲柏斯的位置竟然比台灣還要西邊
這近我驚奇的發現,澳洲柏斯的精度竟然比臺灣甚至今晚還要來的西邊
WarSpotting 統計俄國在烏克蘭戰爭中到底是損失了多少軍事裝備或人員
這個網站可以看到俄羅斯在戰場上的軍事人員裝備損失,非常詳細
Mac上 vim的複製貼上不能用
在freebsd系統中發現vim裡的command+c沒辦法選取複製,但command+v可以貼上
check-host 從世界各地檢查你的網站能不能連線?
檢測你的網站能不能暢通?這個網站可讓你知道你的網站是不是「網際網路」還是「區域網路」?
[Smarty4] 出現 modifiers 函式不能用的問題
當我把smarty由3版更新到4.5.1版的時候,出現了Using unregistered function xx in a template這樣的錯誤,該如何解決?
[Docker] docker中要怎麼修改影像的名稱,rename image
透過 build來的image如果沒有指定名稱,事後要怎麼修改影像的名稱?