Я пользователь Linux Mint 15.
я хотел написать простую программу в C.
Ниже мой код. (Hw.c)
#include<stdio.h>
#include<conio.h>
int main()
{
printf("Hello World");
}
Но, когда я пытаюсь скомпилировать его с помощью gcc
gcc -o hw hw.c
это дает мне ошибку
hw.c:1:18: fatal error: stdio.h: No such file or directory
compilation terminated.
Я googled и нашел некоторые решения, которые говорят, чтобы установить build-essential
и попытался установить его
sudo apt-get install build-essintial
но он снова дает ошибку. Ошибка
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:
build-essential : Depends: libc6-dev but it is not going to be installed or
libc-dev
Depends: g++ (>= 4:4.4.3) but it is not going to be installed
Depends: dpkg-dev (>= 1.13.5) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Итак, что не так? В чем проблема?
Как его решить?
PS.
Результатом locate stdio.h
является
/usr/lib/perl/5.14.2/CORE/nostdio.h
/usr/lib/syslinux/com32/include/stdio.h