[SOLVED] Linux Mint 20.1 Cinnamon missing gcc header files

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
RWMills
Level 1
Level 1
Posts: 9
Joined: Sat May 08, 2021 2:57 am
Location: London, England

[SOLVED] Linux Mint 20.1 Cinnamon missing gcc header files

Post by RWMills »

Just installed Cinnamon 20.1 (upgrade from 18.3 via live cd/usb) and am unable to compile C programs.

$ gcc --version
gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiler reports "No such file or directory" for the following header files: math.h, stdlib.h, ctype.h & sys/types.h

If I do a search for Gcc in Software Manager it shows a tick mark (installed?) for the following packages: Gcc, Gcc-10-base, Gcc-9 & Gcc-9-base

I assume that the header files are in another package that has not been installed.
Last edited by SMG on Fri Feb 09, 2024 11:59 am, edited 3 times in total.
Reason: Added [SOLVED] to the title per user request.
User avatar
xenopeek
Level 25
Level 25
Posts: 29615
Joined: Wed Jul 06, 2011 3:58 am

Re: Cinnamon 20.1 missing gcc header files

Post by xenopeek »

To get the most common development libraries available for using with compilers, and general compiler tools, install the package build-essential. Install through Synaptic Package Manager or with command: apt install build-essential
Image
RWMills
Level 1
Level 1
Posts: 9
Joined: Sat May 08, 2021 2:57 am
Location: London, England

[SOLVED] Re: Linux Mint 20.1 Cinnamon missing gcc header files

Post by RWMills »

Thanks xenopeek. That solved it.

Don't remember needing to install build-essential when I upgraded from 17 to 18.
Locked

Return to “Beginner Questions”