MongoDB 关于 Ubuntu 奇怪的错误 ^?ELF^B^A^A
MongoDB on Ubuntu weird error ^?ELF^B^A^A
我 运行 MongoDB 在 Ubuntu 服务器上与我的 nodeJS 应用程序一起成功。但是由于某种原因,当我用 forever start /path/to/mongod
:
启动它时,我的 mongodb-log 出现以下错误
/mongodb/mongodb-linux-x86_64-3.0.5/bin/mongod:1
(function (exports, require, module, __filename, __dirname) { ^?ELF^B^A^A^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
error: Forever detected script exited with code: 8
我删除了mongodb目录并重新安装,但仍然出现同样的错误。
感谢您的帮助
forever
仅适用于 node.js-based 模块。 mongod
是一个二进制文件(即 ELF 格式,请执行 file $(which mongod)
自己验证)并且不能由 forever
.
处理
你看到的是 forever
试图使用节点启动一个名为 mongo
的节点模块并且无法编译 js 代码(因为它正在读取 ELF header)。
对于常规守护进程,您将不得不依赖系统的初始化系统。我会 start reading here 如何进行。
我 运行 MongoDB 在 Ubuntu 服务器上与我的 nodeJS 应用程序一起成功。但是由于某种原因,当我用 forever start /path/to/mongod
:
/mongodb/mongodb-linux-x86_64-3.0.5/bin/mongod:1
(function (exports, require, module, __filename, __dirname) { ^?ELF^B^A^A^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
error: Forever detected script exited with code: 8
我删除了mongodb目录并重新安装,但仍然出现同样的错误。
感谢您的帮助
forever
仅适用于 node.js-based 模块。 mongod
是一个二进制文件(即 ELF 格式,请执行 file $(which mongod)
自己验证)并且不能由 forever
.
你看到的是 forever
试图使用节点启动一个名为 mongo
的节点模块并且无法编译 js 代码(因为它正在读取 ELF header)。
对于常规守护进程,您将不得不依赖系统的初始化系统。我会 start reading here 如何进行。