微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

错误 Linux Mint“检查工作的 C 编译器:/usr/bin/cc”

如何解决错误 Linux Mint“检查工作的 C 编译器:/usr/bin/cc”

我想在带有 obs studio 的 linux 上使用虚拟相机。我看到这个包裹 https://github.com/CatxFish/obs-v4l2sink 我跑了 sudo apt install qtbase5-dev sudo apt install libobs-dev git clone --recursive https://github.com/obsproject/obs-studio.git git clone https://github.com/CatxFish/obs-v4l2sink.git cd obs-v4l2sink mkdir build && cd build cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr ..

当我跑 cmake -DLIBOBS_INCLUDE_DIR="../../obs-studio/libobs" -DCMAKE_INSTALL_PREFIX=/usr .. 我有错误 `-- C 编译器标识为 GNU 9.3.0 -- CXX 编译器标识未知 -- 检查工作的 C 编译器:/usr/bin/cc -- 检查工作的 C 编译器:/usr/bin/cc -- 损坏 /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 处的 CMake 错误(消息): C 编译器

"/usr/bin/cc"

无法编译一个简单的测试程序。

失败,输出如下:

Change Dir: /home/arp/obs-v4l2sink/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC_a18d3/fast && /usr/bin/make -f CMakeFiles/cmTC_a18d3.dir/build.make CMakeFiles/cmTC_a18d3.dir/build
make[1]: Entering directory '/home/arp/obs-v4l2sink/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_a18d3.dir/testCCompiler.c.o
/usr/bin/cc    -o CMakeFiles/cmTC_a18d3.dir/testCCompiler.c.o   -c /home/arp/obs-v4l2sink/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_a18d3
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_a18d3.dir/link.txt --verbose=1
/usr/bin/cc      CMakeFiles/cmTC_a18d3.dir/testCCompiler.c.o  -o cmTC_a18d3 
/usr/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
collect2: error: ld returned 1 exit status
make[1]: *** [CMakeFiles/cmTC_a18d3.dir/build.make:87: cmTC_a18d3] Error 1
make[1]: Leaving directory '/home/arp/obs-v4l2sink/build/CMakeFiles/CMakeTmp'
make: *** [Makefile:121: cmTC_a18d3/fast] Error 2

CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:2 (project)

CMake Error at CMakeLists.txt:2 (project): No CMAKE_CXX_COMPILER Could be found.

Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler,or to the compiler name if it is in the PATH.

-- Configuring incomplete,errors occurred! See also "/home/arp/obs-v4l2sink/build/CMakeFiles/CMakeOutput.log". See also "/home/arp/obs-v4l2sink/build/CMakeFiles/CMakeError.log".

我看过一些文章。但没有任何变化。

有人可以帮我吗?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。