C compiler for Rocky Linux 9.4


I thought most Linux distro’s came with a basic C compiler. Does Rocky Linux 9.4 have a C compiler installed or do I need to install a package? Some details would be most helpful.



You can install the gcc package - since this is the C compiler.

dnf install gcc

However that may not be enough if you are attempting to compile other things. You would need to explain more about what you are trying to do?

If wanting to do more than compile C, for example you have downloaded some source to install on Rocky 9, then you would be better to install the Development Tools group of packages, so:

dnf group install "Development Tools"

As an aside, please do not post your email address on the forums in public, since it will cause you to receive a whole ton of spam if posts are scanned for such details. I have thus removed your email address from your above post for your own protection. Any such data like email address or website, you can put in your profile. (we also don’t tolerate spam in posts on the forum either, another reason for not posting email addresses or websites in posts as self-promotion).


Thanks for the details.

On the C compiler reason being Mathworks wants it for Simulink and other tools of theirs so code can be compiled.

I mess with assembly language too. I would like to know about the kdbg debugger tool. Can I just use dnf command and package name to install this?

How to find packages for Rocky Linux? Some details?

Thanks for your response.

To find packages, https://pkgs.org is a good place to start. There are dnf commands that can be used as well to find out for example, what binary belongs to what package. For example:

[root@rocky8 ~]# dnf provides *bin/vlc

Updating Subscription Management repositories.
Last metadata expiration check: 0:00:34 ago on Tue 09 Jul 2024 04:22:12 PM CEST.
vlc-core-1:3.0.21-1.el8.x86_64 : VLC media player core
Repo        : rpmfusion-free-updates
Matched from:
Other       : *bin/vlc

would find vlc located in either a bin or sbin directory. Or another way:

[root@rocky8 ~]# dnf whatprovides vlc

Updating Subscription Management repositories.
Last metadata expiration check: 0:01:19 ago on Tue 09 Jul 2024 04:22:12 PM CEST.
vlc-1:3.0.21-1.el8.x86_64 : The cross-platform open-source multimedia framework,
                          : player and server
Repo        : rpmfusion-free-updates
Matched from:
Provide    : vlc = 1:3.0.21-1.el8

as for kdbg according to pkgs.org there isn’t anything that exists like that for EL-based distros. In which case would mean finding a source rpm from perhaps Fedora and using mock to build it for Rocky Linux, or compiling from source manually. Mock would be the preferred way.