首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在非根服务器上构建spectrum2

在非根服务器上构建spectrum2
EN

Stack Overflow用户
提问于 2016-03-17 17:59:58
回答 1查看 47关注 0票数 0

正如主题所述,我在非根服务器上安装spectrum2时遇到了问题。主要的问题是,我必须从源代码构建大量的依赖项,并正确地链接它们。我已经在/home/$USER/log4cxx_build/apache-log4cxx-0.10.0中安装了log4cxx及其依赖项。当尝试cd libtransportmake时,我得到了以下结果:

代码语言:javascript
复制
$USER@puppis libtransport]$ make
[  1%] Built target pb
[  1%] Building CXX object plugin/cpp/CMakeFiles/transport-plugin.dir/networkplugin.cpp.o
In Datei, eingefügt von /home/$USER/libtransport/plugin/cpp/networkplugin.cpp:23:
/home/$USER/libtransport/include/transport/Logging.h:30:28: Fehler: log4cxx/logger.h: Datei oder Verzeichnis nicht gefunden
/home/$USER/libtransport/include/transport/Logging.h:31:37: Fehler: log4cxx/consoleappender.h: Datei oder Verzeichnis nicht gefunden
/home/$USER/libtransport/include/transport/Logging.h:32:35: Fehler: log4cxx/patternlayout.h: Datei oder Verzeichnis nicht gefunden
/home/$USER/libtransport/include/transport/Logging.h:33:42: Fehler: log4cxx/propertyconfigurator.h: Datei oder Verzeichnis nicht gefunden
/home/$USER/libtransport/include/transport/Logging.h:34:40: Fehler: log4cxx/helpers/properties.h: Datei oder Verzeichnis nicht gefunden
/home/$USER/libtransport/include/transport/Logging.h:35:45: Fehler: log4cxx/helpers/fileinputstream.h: Datei oder Verzeichnis nicht gefunden
/home/$USER/libtransport/include/transport/Logging.h:36:40: Fehler: log4cxx/helpers/transcoder.h: Datei oder Verzeichnis nicht gefunden
/home/$USER/libtransport/include/transport/Logging.h:38:32: Fehler: log4cxx/logmanager.h: Datei oder Verzeichnis nicht gefunden
In file included from /home/$USER/libtransport/plugin/cpp/networkplugin.cpp:23:
/home/$USER/libtransport/include/transport/Logging.h:42: Fehler: »log4cxx« is not a namespace-name
/home/$USER/libtransport/include/transport/Logging.h:42: Fehler: expected namespace-name before »;« token
/home/$USER/libtransport/plugin/cpp/networkplugin.cpp:38: Fehler: »log4cxx« has not been declared
/home/$USER/libtransport/plugin/cpp/networkplugin.cpp:38: Fehler: expected initializer before »logger«
/home/$USER/libtransport/plugin/cpp/networkplugin.cpp: In member function »void Transport::NetworkPlugin::checkPing()«:
/home/$USER/libtransport/plugin/cpp/networkplugin.cpp:679: Fehler: »logger« wurde in diesem Gültigkeitsbereich nicht definiert
/home/$USER/libtransport/plugin/cpp/networkplugin.cpp:679: Fehler: »LOG4CXX_ERROR« wurde in diesem Gültigkeitsbereich nicht definiert
make[2]: *** [plugin/cpp/CMakeFiles/transport-plugin.dir/networkplugin.cpp.o] Fehler 1
make[1]: *** [plugin/cpp/CMakeFiles/transport-plugin.dir/all] Fehler 2
make: *** [all] Fehler 2

似乎在安装过程中找不到log4cxx。

任何帮助都是非常感谢的。提前感谢!:-)

EN

回答 1

Stack Overflow用户

发布于 2016-03-17 18:18:10

在用户目录中安装了log4cxx之后,您需要重新运行cmake并添加搜索头文件和库的位置提示,例如,可以这样做:

cmake . -DCMAKE_INCLUDE_PATH=/home/$USER/log4cxx_build/apache-log4cxx-0.10.0/include -DCMAKE_LIBRARY_PATH=/home/$USER/log4cxx_build/apache-log4cxx-0.10.0/lib

另外,最好将所有依赖项安装到单个目录中

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36057149

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档