我正在尝试按照www.example.com上的说明设置CLion以使用Linux的Windows子系统https://www.jetbrains.com/help/clion/how-to-use-wsl-development-environment-in-clion.html#。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
我该怎么做才能解决这个问题?
3条答案
按热度按时间jdzmm42g1#
我在使用WSL 2和Ubuntu 20.04.1时也遇到过同样的问题。
问题似乎是Ubuntu WSL和Windows主机的处理器时钟稍微不同步。
CMakeError.log:
使用
wsl --shutdown
和wsl
重新启动WSL解决了此问题。可以在here中找到问题的解决方案。
nwwlzxa72#
在第一步检查你安装了所有的依赖项
然后你应该配置ssh服务器在你的ubuntu终端如果你能做它自己伟大!你不需要做任何事但是如果你不能使用jetbrains脚本
在工具链部分连接到ssh会话
但是在回顾了这个之后,我注意到编译器在最后一页给了你一个日志文件,以获得进一步的信息,发送到这里,并尝试重新安装包,这应该在大多数情况下工作正常,有一个问题,你使用的是wsl 1还是2?wsl 2比1有更多的功能,但它有这么多的bug,它不适合mot程序员,我不建议任何人使用
yk9xbfzb3#
你可以把clion安装在wsl2中,就像它是一台普通的linux机器一样,然后创建一个可执行的powershel scrypt,你可以使用this repo的指令从windows端自动启动clion。
您需要启用: