Skip to content

Ubuntuで、npm install onigurumaする際にエラーが出る #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
geckotang opened this issue Apr 5, 2016 · 2 comments
Closed

Comments

@geckotang
Copy link

  • 背景
    • Ubuntu上で、npm install onigurumaをした際にエラーになりインストールが出来ない
  • 実行環境
    • Node.jsのバージョン
      • v4.2.2
    • npmのバージョン
      • 2.14.7
    • OSのバージョン
      • Linux www7282uf 2.6.32-40-server #87-Ubuntu SMP Tue Mar 6 02:10:02 UTC 2012 x86_64 GNU/Linux
  • エラーログ
@watilde
Copy link
Owner

watilde commented Apr 7, 2016

こんにちは!
node-gyprebuildでコケてるみたいですね。下記の2点を確認お願いします。

  1. globalにinstallされている gyp を消す
    参考: 'module' object has no attribute 'script_main' nodejs/node-gyp#363 (comment)
  2. Node.js v4でNaNに変更があったので、gccを4.8以上にする
    参考: 'make test' fails with errors in header files for node v4.0 nodejs/nan#448

@geckotang
Copy link
Author

globalにinstallされている gyp を消す

$ apt-get remove gyp
E: ロックファイル /var/lib/dpkg/lock をオープンできません - open (13: 許可がありません)
E: 管理用ディレクトリ (/var/lib/dpkg/) をロックできません。root 権限で実行していますか?

$ python -c 'import gyp; print gyp.__file__'
Traceback (most recent call last):
 File "<string>", line 1, in <module>
ImportError: No module named gyp

Node.js v4でNaNに変更があったので、gccを4.8以上にする

http://qiita.com/aKenjiKato/items/e9011e02feb131c4526e を参考にして
g++とgccをv4.4からv4.8にしたら、 npm i oniguruma することができました。
ありがとうござます。

watilde pushed a commit that referenced this issue Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants