Не удается установить node-xmpp или node-expat из-за ошибки перестроения node-gyp.

Я только начинаю работать с node.js и упираюсь в стену, пытаясь установить node-xmpp и node-expat. Кажется, что перестройка node-gyp является распространенной причиной.

Я на Ubuntu 10.04. После запуска npm install node-expat я получаю следующий вывод:

npm http GET https://registry.npmjs.org/node-expat
npm http 200 https://registry.npmjs.org/node-expat
npm http GET https://registry.npmjs.org/nan
npm http 200 https://registry.npmjs.org/nan

> [email protected] install /root/node_modules/node-expat
> node-gyp rebuild

Traceback (most recent call last):
  File "/root/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
  File "/root/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 534, in script_main
    return main(sys.argv[1:])
  File "/root/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 527, in main
    return gyp_main(args)
  File "/root/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 503, in gyp_main
    options.circular_check)
  File "/root/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 129, in Load
    params['parallel'], params['root_targets'])
  File "/root/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2687, in Load
    generator_input_info)
  File "/root/local/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 594, in LoadTargetBuildFilesParallel
    parallel_state.pool = multiprocessing.Pool(8)
  File "/usr/lib/python2.6/multiprocessing/__init__.py", line 227, in Pool
    return Pool(processes, initializer, initargs)
  File "/usr/lib/python2.6/multiprocessing/pool.py", line 84, in __init__
    self._setup_queues()
  File "/usr/lib/python2.6/multiprocessing/pool.py", line 131, in _setup_queues
    self._inqueue = SimpleQueue()
  File "/usr/lib/python2.6/multiprocessing/queues.py", line 328, in __init__
    self._rlock = Lock()
  File "/usr/lib/python2.6/multiprocessing/synchronize.py", line 117, in __init__
    SemLock.__init__(self, SEMAPHORE, 1, 1)
  File "/usr/lib/python2.6/multiprocessing/synchronize.py", line 49, in __init__
    sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue)
OSError: [Errno 38] Function not implemented
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/root/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 2.6.18-028stab093.2
gyp ERR! command "node" "/root/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/node_modules/node-expat
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the node-expat package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-expat
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 2.6.18-028stab093.2
npm ERR! command "node" "/root/local/bin/npm" "install" "node-expat"
npm ERR! cwd /root
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.23
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /root/npm-debug.log
npm ERR! not ok code 0

Большое спасибо за любую помощь, которую вы можете предоставить.

Обновление: соответствующее сообщение об ошибке здесь OSError: [Errno 38] Function not implemented и привело к решению.


person user577268    schedule 11.01.2014    source источник
comment
См. эти вопросы: stackoverflow.com/questions/3314031/ и stackoverflow.com/questions/6033599/   -  person user568109    schedule 12.01.2014
comment
Спасибо, что поставили меня на путь @ user568109. Обновление вопроса с указанием соответствующего сообщения об ошибке.   -  person user577268    schedule 12.01.2014


Ответы (2)


Решение найдено здесь Реализация Django Celery - OSError errno 38 - Функция не реализована.

Шаги следующим образом:

  1. Добавьте none /dev/shm tmpfs rw,nosuid,nodev,noexec 0 0 в /etc/fstab.
  2. Затем sudo mount /dev/shm
person user577268    schedule 12.01.2014

person    schedule
comment
Вместо того, чтобы просто опубликовать одну или две команды для запуска, было бы предпочтительнее объяснить, в чем проблема и почему запуск этих команд будет работать. - person Bernhard Barker; 27.02.2014