我需要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
之后,您还有这个问题吗? - Brecht Sanders