【发布时间】:2021-08-05 19:35:57
【问题描述】:
我正在使用 Ubuntu 20.04 LTS,我一直在尝试在 codeblocks IDE 中启动并运行 C 程序,但它一直让我出现以下错误。
Checking for existence: /media/darkpheonix/dptech/dptech/Projects/C/techtheory/bin/Debug/techtheory
Set variable: LD_LIBRARY_PATH=.:
Executing: xterm -T techtheory -e /usr/bin/cb_console_runner LD_LIBRARY_PATH=:. /media/darkpheonix/dptech/dptech/Projects/C/techtheory/bin/Debug/techtheory (in /media/darkpheonix/dptech/dptech/Projects/C/techtheory/.)
Process terminated with status -1 (0 minute(s), 0 second(s))
我尝试了sudo apt-get update 和sudo apt-get upgrade
然后尝试从主服务器安装构建基本包。 sudo apt-get install build-essentials。
这让我不断出现以下错误。
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package build-essential is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'build-essential' has no installation candidate
我尝试了不同的来源,但似乎没有解决这个问题。请帮忙
【问题讨论】:
-
您的 [已发布]
apt-get命令使用build-essentials,但您的错误消息抱怨build-essential。因此,您发布的命令中的错误输出是 not 。我认为你想要复数版本。 -
@CraigEstey 我发现了
build-essential问题。sudo apt-get build-essential工作。虽然路径错误发生在 CodeBlcoks 中。它需要gcc compiler的路径,但我找不到导出路径的方法,因为我不知道。
标签: c gcc compiler-errors codeblocks