当我在Python 2.7.10 docker container中编译Node.js 4.0.0源代码时,发生了make测试失败。
首先,我只使用Docker官方Python 2.7.10映像运行容器,容器有gcc 4.9,make 4.0,python 2.7,满足Node.js 4.0.0的需要。
然后在容器中操作(登录到容器的外壳)。
在/ usr / src / nodejs下载Node.js 4.0.0源代码并在下面运行
./configure && make && make install && make test
该过程在make test
处停止,错误消息为:
=== release test-tick-processor ===
Path: parallel/test-tick-processor
nm: '/var/lib/docker/aufs/diff/9f4978cc45a4e08268de6e77e49c6e837ab58eb204846975b6db6e5474769d7b/usr/src/nodejs/out/Release/node': No such file
nm: '/var/lib/docker/aufs/diff/843e2bded49837e4846422f3a82a67be3ccc46c3e636e03d8d946c57564468ba/lib/x86_64-linux-gnu/libc-2.19.so': No such file
nm: '/var/lib/docker/aufs/diff/843e2bded49837e4846422f3a82a67be3ccc46c3e636e03d8d946c57564468ba/lib/x86_64-linux-gnu/libpthread-2.19.so': No such file
nm: '/var/lib/docker/aufs/diff/843e2bded49837e4846422f3a82a67be3ccc46c3e636e03d8d946c57564468ba/lib/x86_64-linux-gnu/libgcc_s.so.1': No such file
nm: '/var/lib/docker/aufs/diff/843e2bded49837e4846422f3a82a67be3ccc46c3e636e03d8d946c57564468ba/lib/x86_64-linux-gnu/libm-2.19.so': No such file
nm: '/var/lib/docker/aufs/diff/843e2bded49837e4846422f3a82a67be3ccc46c3e636e03d8d946c57564468ba/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20': No such file
nm: '/var/lib/docker/aufs/diff/843e2bded49837e4846422f3a82a67be3ccc46c3e636e03d8d946c57564468ba/lib/x86_64-linux-gnu/librt-2.19.so': No such file
nm: '/var/lib/docker/aufs/diff/843e2bded49837e4846422f3a82a67be3ccc46c3e636e03d8d946c57564468ba/lib/x86_64-linux-gnu/libdl-2.19.so': No such file
nm: '/var/lib/docker/aufs/diff/843e2bded49837e4846422f3a82a67be3ccc46c3e636e03d8d946c57564468ba/lib/x86_64-linux-gnu/ld-2.19.so': No such file
assert.js:89
throw new assert.AssertionError({
^
AssertionError: null == true
at Object. (/usr/src/nodejs/test/parallel/test-tick-processor.js:34:1)
at Module._compile (module.js:434:26)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:475:10)
at startup (node.js:117:18)
at node.js:951:3
Command: out/Release/node /usr/src/nodejs/test/parallel/test-tick-processor.js
var fs = require('fs');
开头有test-tick-processor.js
。我认为这个命令给出了导致问题的错误目录。
如何解决这个问题,以便确保Node.js 4.0.0正确安装?
答案 0 :(得分:2)
在撰写本文时,对于你失败的test-tick-processor
测试在Node.js中是不稳定的。来自核心撰稿人的an open issue about it包含此评论(11天前):
似乎这个测试至少在所有Linux平台上都是不稳定的(可能在armv7中的失败率要高得多)。
让make test
通过的一些选项包括:
make test
并查看测试是否通过test/parallel/test-tick-processor.js
来停用测试
require('fs')
行不是问题。 fs
是内置模块,不需要任何目录。如果那条线爆炸了,你就不会得到AssertionError
。堆栈跟踪表明断言在文件的第34行失败。