启动mongodb时出现DYLD错误

时间:2015-02-20 18:51:41

标签: macos mongodb dyld

我安装了mongo:

brew install mongodb

我创建了数据目录:

/data/dir

我包含mongod路径(which mongod --> /opt/local/bin/mongod):

export PATH=$PATH:/opt/local/bin/mongod

我试图运行mongod

mongod

得到了这个回复:

dyld: lazy symbol binding failed: Symbol not found: __ZN7pcrecpp2RE4InitERKSsPKNS_10RE_OptionsE
  Referenced from: /opt/local/bin/mongod
  Expected in: /opt/local/lib/libpcrecpp.0.dylib

dyld: Symbol not found: __ZN7pcrecpp2RE4InitERKSsPKNS_10RE_OptionsE
  Referenced from: /opt/local/bin/mongod
  Expected in: /opt/local/lib/libpcrecpp.0.dylib

这个错误到底是什么?我该怎么办?

1 个答案:

答案 0 :(得分:0)

问题是我设置了错误目录的路径

Brew会将软件包安装到/usr/local/bin,这里有一个符号链接mongod@ -> homebrew's cellar

所以,我跑了/usr/local/bin/mongod,然后就开始了。