致命错误:log4cxx/logger.h:没有此文件或目录

致命错误:log4cxx/logger.h:没有此文件或目录

每当我从命令行编译我的 C++ 代码时都会出现此错误。

fatal error: log4cxx/logger.h: No such file or directory

有没有什么简单的方法可以使用从命令行下载 log4cxx 包apt get

我确实找到了维基百科其中讨论了如何一步一步地下载并编译它。但是,apt get我们有什么方法可以使用吗?

更新:-

这是我安装时得到的结果sudo apt-get install liblog4cxx10-dev

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 liblog4cxx10-dev : Depends: libaprutil1-dev but it is not going to be installed
E: Broken packages

我在这里做错了什么?有什么想法吗?

答案1

您缺少开发包liblog4cxx10-dev。您需要安装它才能编译使用该库的代码。

相关内容