未找到建筑dlib#include<string>

2024-04-28 09:17:20 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试安装howdy,这需要在系统范围内安装dlib。但是,cmake无法生成一些未找到的基本头(下面的堆栈摘录)

我通过简单地调用sudo pip3 install dlib成功地复制了相同的错误

我所做的:

  • 我以前曾经安装过Howdy,并且工作得很好
  • 出于一些无关的原因,我卸载了python系统范围,这破坏了很多东西(尤其是gnome)
  • 设法重新安装了大多数东西,但没有安装howdy

奇怪的是,我可以在用户空间(pip3 install dlib中安装和使用dlib而没有问题

截断的堆栈跟踪:

Installing collected packages: dlib
...
   Invoking CMake build: 'cmake --build . --config Release -- -j4'
    Scanning dependencies of target dlib
    [  2%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_2.cpp.o
    [  2%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_1.cpp.o
...
/tmp/pip-install-x10yjhu1/dlib_eaecabb22c5e4734b842455a6d752d55/dlib/bigint/../algs.h:93:10: fatal error: string: No such file or director
       93 | #include <string>       // for the exceptions
          |          ^~~~~~~~
    compilation terminated.
...
        7 | #include <iosfwd>
          |          ^~~~~~~~

错误之前堆栈中可能存在一个相关警告:

Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5")
    -- Found CUDA, but CMake was unable to find the cuBLAS libraries that should be part of every basic CUDA install. Your CUDA install is somehow broken or incomplete. 
Since cuBLAS is required for dlib to use CUDA we won't use CUDA.

到目前为止,我发现的唯一提示是,它可能试图使用gcc而不是g++进行编译


Tags: installofbuildcmakeis堆栈系统错误