【问题标题】:Compiling MongoDB r2.0.2 on ubuntu 10.04 resulted in error在 ubuntu 10.04 上编译 MongoDB r2.0.2 导致错误
【发布时间】:2012-02-03 04:38:05
【问题描述】:

我正在使用来自 http://www.mongodb.org/display/DOCS/Building+for+Linux 的指令从源代码编译 MongoDB

我在运行“scons all”后遇到了这个错误:

rty/js-1.7/jsscan.c
third_party/js-1.7/jsscan.c:112:22: error: jsautokw.h: No such file or directory
third_party/js-1.7/jsscan.c: In function 'FindKeyword':
third_party/js-1.7/jsscan.c:122: warning: label 'test_guess' defined but not used
third_party/js-1.7/jsscan.c:119: warning: label 'got_match' defined but not used
scons: *** [third_party/js-1.7/jsscan.o] Error 1
scons: building terminated because of errors

我使用的是 64 位 ubuntu 10.04。 gcc版本4.4.3(Ubuntu 4.4.3-4ubuntu5),scons版本为:

script: v1.2.0.d20100117.r4629, 2010/01/17 22:23:21, by scons on scons-dev
engine: v1.2.0.d20100117.r4629, 2010/01/17 22:23:21, by scons on scons-dev

有人有同样的问题吗?此 jsscan 文件在早期版本中报告了类似的错误,但此后已修复。

【问题讨论】:

  • 我在 Ubuntu 10.4.3 LTS 上得到了同样的结果。文档说,如果我们在 ubuntu 上遇到错误,请按照此处的说明尝试构建自己的蜘蛛猴:mongodb.org/display/DOCS/Building+Spider+Monkey 我会尝试并报告。

标签: mongodb compiler-errors ubuntu-10.04


【解决方案1】:

无需卸载“xulrunner-1.9.2-dev”和“xulrunner-1.9.2”,因为它还会卸载您以后可能需要的其他软件包。 只需安装较新版本的 scons 包(我使用的是 scons-2.1.0)。

  1. 下载scons-2.1.0.tar.gz
  2. 安装它并使用已安装的替代 Ubuntu 10.04 的 scons v1.2.0 存储库包。

它对我有用,没有任何额外的技巧。

【讨论】:

  • 我确认升级 scons 就足够了。就我而言,我执行了以下操作:apt-get install python-virtualenv 然后virtualenv ~/env 然后. ~/env/bin/activate 然后下载 scons 和 python setup.py install 它(因为 pip install scons 出于某种奇怪的原因没有工作)。然后 MongoDB 就完成了。
  • 我在使用 scons 的下载版本时遇到了问题,但仍然安装了旧的 Ubuntu 版本。使用 apt-get remove 删除 Ubuntu 版本解决了它。
【解决方案2】:

老兄,它成功了!这样做:

sudo apt-get remove xulrunner-1.9.2-dev xulrunner-1.9.2
curl -O ftp://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
tar zxvf js-1.7.0.tar.gz
cd js/src
export CFLAGS="-DJS_C_STRINGS_ARE_UTF8"
make -f Makefile.ref
sudo JS_DIST=/usr make -f Makefile.ref export

然后再次运行scons all

【讨论】:

  • 另外,卸载它时大声尖叫“XUUUUUULL RUNNNNNER”,只是为了好玩。
  • 酷,谢谢杰夫。接受答案,以便其他人知道这是有效的。
猜你喜欢
  • 2011-05-19
  • 2011-05-15
  • 1970-01-01
  • 1970-01-01
  • 2011-03-04
  • 2015-06-29
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多