An error occurred while compiling the C language program in ubuntu
Source: Internet
Author: User
An error occurred while compiling C language programs in ubuntu -- Linux general technology-Linux programming and kernel information. For details, refer to the following section. Compile the c source program in ubuntu for the first time and use gcc, but the following error message is prompted:
Test. c: 1: 19: Error: stdio. h: No such file or directory
Test. c: 2: 23: Error: sys/types. h: No such file or directory
Test. c: 3: 20: Error: signal. h: No such file or directory
Test. c: 4: 20: Error: ourhdr. h: No such file or directory
Basically, these files or directories are not found because the library file is not installed. Run the following command to install and solve the problem:
Sudo apt-get install libc6-dev
Installation Process
Password:
Reading the package list... complete
Analyzing the dependency tree of the software package
Read status information... complete
The following additional software packages will be installed:
Linux-libc-dev
Recommended software packages:
Glibc-doc manpages-dev
The following [new] software packages will be installed:
Linux-libc-dev libc6-dev
A total of 0 software packages have been upgraded, 2 new software packages have been installed, 0 software packages have to be uninstalled, and 0 software have not been upgraded.
Download a software package of kb.
After decompression, 16.4 MB of extra space is consumed.
Do you want to continue? [Y/n] y
Get: 1 http://ftp.sjtu.edu.cn feisty-security/main linux-libc-dev 2.6.20-16.29 [667kB]
Get: 2 http://ftp.sjtu.edu.cn feisty/main libc6-dev 2.5-0ubuntu14 [3018kB]
Download takes 5kb, which takes 2 s (1369kB/s)
The linux-libc-dev software package that was deselected was selected.
(Reading the database... the system currently has a total of 116970 files and directories installed .)
Extracting linux-libc-dev (from.../linux-libc-dev_2.6.20-16.29_i386.deb )...
Selected the software package libc6-dev that was deselected.
Extracting the libc6-dev (from.../libc6-dev_2.5-0ubuntu14_i386.deb )...
Setting linux-libc-dev (2.6.20-16.29 )...
Setting the libc6-dev (2.5-0ubuntu14 )...
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service