0
我已經安裝了節點(nodejs)並且它看起來能夠正常工作,但是當以任何方式使用NPM時我會得到一個錯誤。我廣泛搜索了這個錯誤,並嘗試了各種解決方案,但無法找到解決方案。在ubuntu服務器(數字海洋)上運行NPM時出錯
在終端,我得到:
[email protected]:~$ nodejs -v
v6.9.1
[email protected]:~$ npm -v
/usr/local/bin/node: 1: /usr/local/bin/node: ??????: not found
/usr/local/bin/node: 2: /usr/local/bin/node: -í: not found
/usr/local/bin/node: 3: /usr/local/bin/node:?__stubs__TEXT.ͭ8=?__stub_helper__TEXTh: not found
/usr/local/bin/node: 4: /usr/local/bin/node: ?ph: not found
/usr/local/bin/node: 6: /usr/local/bin/node: ??__cstring__TEXT??KV
?__const__TEXTp?$?Gp?
[email protected]
0__dof_node__TEXTp,p,__unwind_info__TEXT5?,5__eh_frame__TEXT?aP??ah__DATA?: not found
/usr/local/bin/node: 7: /usr/local/bin/node: ?: not found
/usr/local/bin/node: 8: /usr/local/bin/node: Syntax error: word unexpected (expecting ")")
[email protected]:~$
任何幫助,將不勝感激。
這個問題是特定於Ubuntu發佈在http://askubuntu.com/,那裏你可能會得到答案 –
Did [my answer](http://stackoverflow.com/questions/40876831/error-running-npm -on-ubuntu-server-digital-ocean/40876935#40876935)help?任何意見? – rsp
我無法按照你給rsp的回答(我的錯)。我感到沮喪,完全重新燃起了液滴,併發揮作用。 – DanHitt