nodejs - 03.错误:‘make_unique’不是‘std’的成员 WARNING: C++ Compiler too old, need g++ 4.9.4 or clang++ 解决方案
Posted iwanghang
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nodejs - 03.错误:‘make_unique’不是‘std’的成员 WARNING: C++ Compiler too old, need g++ 4.9.4 or clang++ 解决方案相关的知识,希望对你有一定的参考价值。
错误解决方案:升级gcc
如何升级gcc请参考下面的博文,非常好:
https://blog.csdn.net/w670328683/article/details/79404417
WARNING: C++ Compiler too old, need g++ 4.9.4 or clang++ 3.4.2 (CXX=g++)
../src/cares_wrap.cc: 在函数‘void node::cares_wrap::anonymous::Query(const v8::FunctionCallbackInfo<v8::Value>&)’中:
../src/cares_wrap.cc:1799:15: 错误:‘make_unique’不是‘std’的成员
auto wrap = std::make_unique<Wrap>(channel, req_wrap_obj);
^
../src/cares_wrap.cc:1799:36: 错误:expected primary-expression before ‘>’ token
auto wrap = std::make_unique<Wrap>(channel, req_wrap_obj);
^
../src/cares_wrap.cc: 在函数‘void node::cares_wrap::anonymous::GetAddrInfo(const v8::FunctionCallbackInfo<v8::Value>&)’中:
../src/cares_wrap.cc:1973:19: 错误:‘make_unique’不是‘std’的成员
auto req_wrap = std::make_unique<GetAddrInfoReqWrap>(env,
^
../src/cares_wrap.cc:1973:54: 错误:expected primary-expression before ‘>’ token
auto req_wrap = std::make_unique<GetAddrInfoReqWrap>(env,
^
../src/cares_wrap.cc:1974:56: 警告:left operand of comma operator has no effect [-Wunused-value]
req_wrap_obj,
^
../src/cares_wrap.cc:1975:72: 警告:right operand of comma operator has no effect [-Wunused-value]
args[4]->IsTrue());
^
../src/cares_wrap.cc: 在函数‘void node::cares_wrap::anonymous::GetNameInfo(const v8::FunctionCallbackInfo<v8::Value>&)’中:
../src/cares_wrap.cc:2016:19: 错误:‘make_unique’不是‘std’的成员
auto req_wrap = std::make_unique<GetNameInfoReqWrap>(env, req_wrap_obj);
^
../src/cares_wrap.cc:2016:54: 错误:expected primary-expression before ‘>’ token
auto req_wrap = std::make_unique<GetNameInfoReqWrap>(env, req_wrap_obj);
^
../src/cares_wrap.cc:2016:61: 警告:left operand of comma operator has no effect [-Wunused-value]
auto req_wrap = std::make_unique<GetNameInfoReqWrap>(env, req_wrap_obj);
^
make[1]: *** [/root/20190722/node-v10.16.0/out/Release/obj.target/node_lib/src/cares_wrap.o] 错误 1
make[1]: *** 正在等待未完成的任务....
rm d2dca9b40c8b281009c1917aa59b59056ab9c360.intermediate ca06df8373626fd71136d0c714e126936723df94.intermediate 0149ae11bac7f9a6daa6517900906e8a2a143ddd.intermediate
make[1]: 离开目录“/root/20190722/node-v10.16.0/out”
make: *** [node] 错误 2
以上是关于nodejs - 03.错误:‘make_unique’不是‘std’的成员 WARNING: C++ Compiler too old, need g++ 4.9.4 or clang++ 解决方案的主要内容,如果未能解决你的问题,请参考以下文章
NodeJS:MySQL 有时会引发 ETIMEDOUT 错误
web3,松露,nodejs错误:UnhandledPromiseRejectionWarning