【发布时间】:2020-09-24 16:43:39
【问题描述】:
我需要 gcc 来编译 c 代码并且无法在 wsl 上安装 gcc。我试过sudo apt-get install gcc,但它不起作用。这是错误。
hack@DESKTOP-VMQA3JB:~$ sudo apt-get install gcc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
gcc : Depends: gcc-9 (>= 9.2.1-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我不知道要安装的依赖项。也请帮助我使用 gdb。谢谢。
【问题讨论】:
-
运行
sudo apt-get update和sudo apt-get upgrade后还有问题吗? -
是的,它在更新和升级后工作......谢谢!
标签: windows gcc gdb windows-subsystem-for-linux