我正在按照https://www.jetbrains.com/help/clion/how-to-use-wsl-development-environment-in-clion.html#中的说明尝试将CLion设置为使用Linux的Windows子系统。 Windows版本10.0.18362.836。 Ubuntu 20.04 LTS,所有软件均为最新。
我在“设置”对话框的“构建,执行,部署>工具链”页面上报告了以下错误:Test CMake run finished with error more...
详细信息...
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineSystem.cmake:185 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
-- The C compiler identification is GNU 9.3.0
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:212 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
-- The CXX compiler identification is GNU 9.3.0
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:210 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:80 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCXXCompiler.cmake:73 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
-- Configuring incomplete, errors occurred!
See also "/mnt/c/Users/user/AppData/Local/Tmp/cmake_check_environment/_build2367382020510955708/CMakeFiles/CMakeOutput.log".
See also "/mnt/c/Users/user/AppData/Local/Tmp/cmake_check_environment/_build2367382020510955708/CMakeFiles/CMakeError.log".
Error code: 1
我该如何解决?
第一步检查您是否安装了所有依赖项
sudo apt-get install cmake gcc clang gdb build-essential
然后您应该在ubuntu终端上配置ssh服务器如果您自己做得很好!您不需要执行任何其他操作,但是如果您不能使用喷射大脑脚本,则可以使用
在工具链部分中,连接到您的ssh会话
但是经过检查后,我注意到编译器在最后一个底部提供了一个日志文件,以获取更多信息,请在此处将其发送,然后尝试重新安装它们,在大多数情况下应该可以正常工作还有一个问题是您使用的是wsl 1还是2? wsl 2的功能比1多,但它有很多错误,对mot程序员不利,我不建议任何人使用它