我正在运行make -j4
但遇到了以下异常...
userName@phx5qa01c-4e23:~/build$ make -j4
[ 1%] [ 2%] Building CXX object nda/common/loadtest/CMakeFiles/loadtester.dir/LoadTester.cc.o
make[2]: *** No rule to make target `/usr/include/libcql/lib/libcql.so', needed by `nda/common/client/client'. Stop.
make[2]: *** Waiting for unfinished jobs....
Building CXX object nda/unittest/common/CMakeFiles/TestRunner.dir/TestRunner.cc.o
[ 3%] Building CXX object nda/common/client/CMakeFiles/client.dir/main.cc.o
[ 4%] Building CXX object nda/common/CMakeFiles/ndacommon.dir/category_map/CategoryMap.cc.o
In file included from /home/userName/MPL/nda/common/client/main.cc:1:
/home/userName/MPL/nda/common/client/be_cassandra_util.hh:5: fatal error: libcql/cql.hpp: No such file or directory
compilation terminated.
make[2]: *** [nda/common/client/CMakeFiles/client.dir/main.cc.o] Error 1
make[1]: *** [nda/common/client/CMakeFiles/client.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 5%] Building CXX object nda/common/CMakeFiles/ndacommon.dir/curl_handler/CurlHandler.cc.o
/home/userName/MPL/nda/common/curl_handler/CurlHandler.cc:12: fatal error: log4cxx/logger.h: No such file or directory
compilation terminated.
make[2]: *** [nda/common/CMakeFiles/ndacommon.dir/curl_handler/CurlHandler.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/userName/MPL/nda/unittest/common/TestRunner.cc:8: fatal error: log4cxx/logger.h: No such file or directory
compilation terminated.
make[2]: *** [nda/unittest/common/CMakeFiles/TestRunner.dir/TestRunner.cc.o] Error 1
make[1]: *** [nda/unittest/common/CMakeFiles/TestRunner.dir/all] Error 2
/home/userName/MPL/nda/common/category_map/CategoryMap.cc:11: fatal error: log4cxx/logger.h: No such file or directory
compilation terminated.
make[2]: *** [nda/common/CMakeFiles/ndacommon.dir/category_map/CategoryMap.cc.o] Error 1
make[1]: *** [nda/common/CMakeFiles/ndacommon.dir/all] Error 2
Linking CXX executable loadtester
[ 5%] Built target loadtester
make: *** [all] Error 2
下面是例外情况,我总是得到 -
fatal error: libcql/cql.hpp: No such file or directory
fatal error: log4cxx/logger.h: No such file or directory
我不确定我应该怎么做才能修复这些异常?
如何使用 sudo 安装这两个东西?
答案1
在这两种情况下,您的编译器都无法找到您尝试编译的应用程序所需的标头。
对于libcql/cql.hpp
,您需要下载并安装libcql
:
sudo apt-get 安装 git libasio-dev libssl-dev git 克隆 https://github.com/mstump/libcql.git cd libcql && mkdir build && cd build 制作&& sudo 制作安装
对于log4cxx/logger.h
,您只需安装liblog4cxx10-dev包裹:
sudo apt-get 安装 liblog4cxx10-dev
您现在就可以编译您的应用程序了。