-
Не хватает source code. А без source code компилировать нельзя.
-
Загружаем source code. Компилируем.
https://learn.microsoft.com/en-us/community/content/wsl-user-msft-kernel-v6
uname -r
# Download version `linux-msft-wsl-*` as in your system. Here pwd=~/source/
git clone https://github.com/microsoft/WSL2-Linux-Kernel.git --depth=1 -b linux-msft-wsl-6.6.87.1 WSL2-Linux-Kernel-6.6.87.1
# Build the kernel. Here pwd=~/source/WSL2-Linux-Kernel-6.6.87.1
make -j$(nproc) KCONFIG_CONFIG=Microsoft/config-wsl
# Install the kernel modules and headers
sudo make modules_install headers_install
# Reference `/lib/modules/$(uname -r)+/build` for work
- Enable cpp IntelliSence support
add to settings.json
"C_Cpp.default.includePath": [
"/lib/modules/6.6.87.1-microsoft-standard-WSL2+/build/include"
]
See Hello, world