为了账号安全,请及时绑定邮箱和手机立即绑定

安装mongo编译服务器出现问题

在scon all时候,最后弹出的报错,然后ls中没有mongo。请问怎么解决?报错在下面?

scons: Building targets ...

g++ -o build/darwin/normal/mongo/shell/dbshell.o -c -Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe -Werror -O3 -Wno-unused-local-typedefs -Wno-unused-function -Wno-unused-private-field -Wno-deprecated-declarations -Wno-tautological-constant-out-of-range-compare -Wno-unused-const-variable -mmacosx-version-min=10.6 -DBOOST_ALL_NO_LIB -D_SCONS -DMONGO_EXPOSE_MACROS -DSUPPORT_UTF8 -DMONGO_OPTIMIZED_BUILD -D_FILE_OFFSET_BITS=64 -DMONGO_HAVE_HEADER_UNISTD_H -DMONGO_HAVE_EXECINFO_BACKTRACE -Ibuild/darwin/normal/third_party/snappy -Isrc/third_party/snappy -Ibuild/darwin/normal/third_party/libstemmer_c/include -Isrc/third_party/libstemmer_c/include -Ibuild/darwin/normal/third_party/s2 -Isrc/third_party/s2 -Ibuild/darwin/normal/third_party/boost -Isrc/third_party/boost -Ibuild/darwin/normal/third_party/pcre-8.30 -Isrc/third_party/pcre-8.30 -Ibuild/darwin/normal -Isrc -Ibuild/darwin/normal/mongo -Isrc/mongo src/mongo/shell/dbshell.cpp

In file included from src/mongo/shell/dbshell.cpp:29:

In file included from src/mongo/client/dbclientinterface.h:1380:

src/mongo/client/dbclientcursor.h:120:40: error: 'this' pointer cannot be null

      in well-defined C++ code; pointer may be assumed to always convert to true

      [-Werror,-Wundefined-bool-conversion]

        bool isDead() const { return  !this || cursorId == 0; }

                                      ~^~~~

1 error generated.

scons: *** [build/darwin/normal/mongo/shell/dbshell.o] Error 1

scons: building terminated because of errors.



正在回答

1 回答

是不是gcc版本问题?可以更新下试试

0 回复 有任何疑惑可以回复我~
#1

程序猿天璇 提问者

非常感谢!
2018-06-19 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
mongoDB入门篇
  • 参与学习       95944    人
  • 解答问题       185    个

mongoDB入门视频教程,慕课网带你进入mongoDB神秘世界

进入课程

安装mongo编译服务器出现问题

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信