以下是错误详细信息:
CLion - Build #CL-191.6183.77
Windows - Win10 Home | Version 1803 | OS build 17134.472
Ubuntu - 18.04.2 LTS
WSL CMake - 3.10.2
(note - the CMake[Error|Output].log files don't exist, there's not even the /cmake_check_environment/ folder)
CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:186 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
-- The C compiler identification is GNU 7.3.0
CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineCCompiler.cmake:192 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)
-- The CXX compiler identification is GNU 7.3.0
CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineCXXCompiler.cmake:190 (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 - failed
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:72 (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 - failed
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCXXCompiler.cmake:65 (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/Temp/cmake_check_environment/_build543712673987259618/CMakeFiles/CMakeOutput.log".
See also "/mnt/c/Users/<user>/AppData/Local/Temp/cmake_check_environment/_build543712673987259618/CMakeFiles/CMakeError.log".Error code: 1
解决办法:
1.在/etc /中创建包含内容的文件wsl.conf并编辑:
#vim /etc/wsl.conf
[automount]
options = "metadata"
enabled = true
2.重新启动wsl
管理员权限打开powershell ,然后执行下面命令
关闭:net stop LxssManager
开启:net start LxssManager
3.启动ssh
sudo /etc/init.d/ssh start