The just-installed Linux and Ubuntu versions. I wrote a C program and compiled it using gcc. the following error occurs: test. c: 1: 18: error: stdio. h: Nosuchfileordirectory: Ubuntu Linux is very small. Many packages have not been installed yet. You need to install some file packages to compile the C program. Solution: Input in terminal: The sudoapt-getinstalllibc6-dev system will
The just-installed Linux and Ubuntu versions. I wrote a C program and compiled it using gcc. the following error occurs:
Test. c: 1: 18: error: stdio. h: No such file or directory
Cause: Ubuntu Linux is very small, and many packages have not been installed yet. You need to install some file packages to compile the C program.
Solution: Enter:
Sudo apt-get install libc6-dev
The system automatically downloads and installs a file package. After automatic installation, the c program can be compiled.
The generated Executable File a. out. Enter a. out directly on the terminal and the following error will occur:
Bash: a. out: command not found
Cause: in Linux, no default program is executed in the current directory. If a. out is used directly, the system searches for programs to be modified in the path of path. If no program is found, command not found appears. Therefore, to run your own program, you must add the absolute path of the program. That is,./a. out