[Nodejs] npm install 時跑出錯誤

在 Ubuntu 20.04, Node version: 16.13.0
在安裝 opecc 出噴出一堆錯誤,原本以為是

npm WARN deprecated node-pre-gyp@0.14.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future

這個警告造成無法安裝,但更新之後一樣無法安裝
最好詳細追查錯誤 log 看到底下:
1555 error /bin/sh: 1: python: not found

大致猜測是 20.04 預設沒有 python, 而是 python3
所以用 ln -s /usr/bin/python3 /usr/bin/python 之後
重新執行 npm i

就可以安裝囉!

留言

這個網誌中的熱門文章

[翻譯] 介紹現代網路負載平衡與代理伺服器

Grafana K6

Linux 事件驅動筆記