呃! OMG ENOENT:在安装pocketsphinx节点模块时没有这样的文件或目录,uv_chdir

时间:2017-07-12 19:33:46

标签: node.js npm pocketsphinx

我试图安装节点模块pocketsphinx,但在安装时我收到错误:

ERR! OMG ENOENT: no such file or directory, uv_chdir

当然我明白这意味着什么,但我不知道该怎么做。 如果这有帮助,我正在使用:

ubuntu 16.10,
节点v8.1.4,
cmake 3.5.2,
npm 5.0.3。

终端输出:

jonas@jonas-laptop:~$ sudo npm install -g pocketsphinx

> pocketsphinx@5.0.7 install /usr/local/lib/node_modules/pocketsphinx
> cmake-js compile

info TOOL Using Unix Makefiles generator.
info TOOL Using c++11 compiler standard.
info CMD CONFIGURE
WARN invalid config loglevel="notice"
info REP Build has been failed, trying to do a full rebuild.
info CMD CLEAN
info RUN cmake -E remove_directory "/usr/local/lib/node_modules/pocketsphinx/build"
info CMD CONFIGURE
ERR! OMG ENOENT: no such file or directory, uv_chdir
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pocketsphinx@5.0.7 install: `cmake-js compile`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the pocketsphinx@5.0.7 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jonas/.npm/_logs/2017-07-12T19_03_21_852Z-debug.log
jonas@jonas-laptop:~$ 

错误日志:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install',
1 verbose cli   '-g',
1 verbose cli   'pocketsphinx' ]
2 info using npm@5.0.3
3 info using node@v8.1.4
4 verbose npm-session 32c7a47cae361b7d
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 304 https://registry.npmjs.org/pocketsphinx 1028ms (from cache)
8 silly pacote tag manifest for pocketsphinx@latest fetched in 1234ms
9 silly install loadIdealTree
10 silly install cloneCurrentTreeToIdealTree
11 silly install loadShrinkwrap
12 silly install loadAllDepsIntoIdealTree
13 silly resolveWithNewModule pocketsphinx@5.0.7 checking installable status
14 silly currentTree lib
15 silly idealTree lib
15 silly idealTree └── pocketsphinx@5.0.7
16 silly install generateActionsToTake
17 silly diffTrees action count 1
18 silly diffTrees add pocketsphinx@5.0.7
19 silly decomposeActions action count 8
20 silly decomposeActions fetch pocketsphinx@5.0.7
21 silly decomposeActions extract pocketsphinx@5.0.7
22 silly decomposeActions preinstall pocketsphinx@5.0.7
23 silly decomposeActions build pocketsphinx@5.0.7
24 silly decomposeActions install pocketsphinx@5.0.7
25 silly decomposeActions postinstall pocketsphinx@5.0.7
26 silly decomposeActions finalize pocketsphinx@5.0.7
27 silly decomposeActions refresh-package-json pocketsphinx@5.0.7
28 silly install executeActions
29 silly doSerial global-install 8
30 verbose correctMkdir /home/jonas/.npm/_locks correctMkdir not in flight; initializing
31 verbose lock using /home/jonas/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging
32 silly doParallel extract 8
33 silly extract pocketsphinx@5.0.7
34 silly pacote trying pocketsphinx@https://registry.npmjs.org/pocketsphinx/-/pocketsphinx-5.0.7.tgz by hash: sha1-dUwktQehepSJPiB7kAzI1mRV6EM=
35 silly pacote pocketsphinx@https://registry.npmjs.org/pocketsphinx/-/pocketsphinx-5.0.7.tgz extracted to /usr/local/lib/node_modules/.staging/pocketsphinx-f65a58b7 by content address 90ms
36 silly doReverseSerial remove 8
37 silly doSerial move 8
38 silly doSerial finalize 8
39 silly finalize /usr/local/lib/node_modules/pocketsphinx
40 silly doParallel refresh-package-json 8
41 silly refresh-package-json /usr/local/lib/node_modules/pocketsphinx
42 silly doParallel preinstall 8
43 silly preinstall pocketsphinx@5.0.7
44 info lifecycle pocketsphinx@5.0.7~preinstall: pocketsphinx@5.0.7
45 silly lifecycle pocketsphinx@5.0.7~preinstall: no script for preinstall, continuing
46 silly doSerial build 8
47 silly build pocketsphinx@5.0.7
48 info linkStuff pocketsphinx@5.0.7
49 silly linkStuff pocketsphinx@5.0.7 has /usr/local/lib/node_modules as its parent node_modules
50 silly linkStuff pocketsphinx@5.0.7 is part of a global install
51 silly linkStuff pocketsphinx@5.0.7 is installed into a global node_modules
52 silly linkStuff pocketsphinx@5.0.7 is installed into the top-level global node_modules
53 verbose linkBins pocketsphinx@5.0.7
54 verbose linkMans pocketsphinx@5.0.7
55 silly doSerial global-link 8
56 silly doParallel update-linked 8
57 silly doSerial install 8
58 silly install pocketsphinx@5.0.7
59 info lifecycle pocketsphinx@5.0.7~install: pocketsphinx@5.0.7
60 verbose lifecycle pocketsphinx@5.0.7~install: unsafe-perm in lifecycle false
61 verbose lifecycle pocketsphinx@5.0.7~install: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/usr/local/lib/node_modules/pocketsphinx/node_modules/.bin:/usr/local/lib/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
62 verbose lifecycle pocketsphinx@5.0.7~install: CWD: /usr/local/lib/node_modules/pocketsphinx
63 silly lifecycle pocketsphinx@5.0.7~install: Args: [ '-c', 'cmake-js compile' ]
64 silly lifecycle pocketsphinx@5.0.7~install: Returned: code: 1  signal: null
65 info lifecycle pocketsphinx@5.0.7~install: Failed to exec install script
66 verbose unlock done using /home/jonas/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging
67 verbose stack Error: pocketsphinx@5.0.7 install: `cmake-js compile`
67 verbose stack Exit status 1
67 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:283:16)
67 verbose stack     at emitTwo (events.js:125:13)
67 verbose stack     at EventEmitter.emit (events.js:213:7)
67 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
67 verbose stack     at emitTwo (events.js:125:13)
67 verbose stack     at ChildProcess.emit (events.js:213:7)
67 verbose stack     at maybeClose (internal/child_process.js:897:16)
67 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
68 verbose pkgid pocketsphinx@5.0.7
69 verbose cwd /home/jonas
70 verbose Linux 4.8.0-58-generic
71 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "pocketsphinx"
72 verbose node v8.1.4
73 verbose npm  v5.0.3
74 error code ELIFECYCLE
75 error errno 1
76 error pocketsphinx@5.0.7 install: `cmake-js compile`
76 error Exit status 1
77 error Failed at the pocketsphinx@5.0.7 install script.
77 error This is probably not a problem with npm. There is likely additional logging output above.
78 verbose exit [ 1, true ]

1 个答案:

答案 0 :(得分:1)

安装之前,检查任何节点服务是否正在运行或者有什么东西在监视node_modules文件夹。在Windows中,Visual Studio代码已经阻止了安装,一旦我关闭了VS Code,就安装了它。 请参考以下内容: https://github.com/npm/npm/issues/17444