# Installing clang-format for use in VS Code

**URL:** <https://forums.rockylinux.org/t/installing-clang-format-for-use-in-vs-code/16897>\
**Category:** Rocky Linux Help & Support\
**Tags:** rocky-linux-9\
**Created:** [December 17, 2024, 4:51pm UTC](https://forums.rockylinux.org/t/installing-clang-format-for-use-in-vs-code/16897 "2024-12-17T16:51:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dyostbh](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dyostbh](https://forums.rockylinux.org/u/dyostbh)\
**Post date:** [December 17, 2024, 4:51pm UTC](https://forums.rockylinux.org/t/installing-clang-format-for-use-in-vs-code/16897/1 "2024-12-17T16:51:03Z")

</div>

Hello, I’ve been looking all over and it looks like it might be possible to install clang-format on Rocky per this post ([Install clang-tools-extra-15 on Rocky 9](https://forums.rockylinux.org/t/install-clang-tools-extra-15-on-rocky-9/9382)) But I’ve not figured out how to install it. I found how to install it on Ubuntu, but that uses the apt-get command, so I tried doing ‘sudo dnf install clang-format’ but got the following message:

Last metadata expiration check: 0:23:46 ago on Tue 17 Dec 2024 08:57:42 AM MST.  
No match for argument: clang-format  
Error: Unable to find a match: clang-format

Is there something I’m missing with the install, or is it not possible to install clang-format on Rocky? Any and all help will be appreciated, I’m fairly new to Rocky.

---

<div class="post-metadata">

**Author:** ![gerry666uk](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@gerry666uk](https://forums.rockylinux.org/u/gerry666uk)\
**Post date:** [December 17, 2024, 10:33pm UTC](https://forums.rockylinux.org/t/installing-clang-format-for-use-in-vs-code/16897/2 "2024-12-17T22:33:41Z")

</div>

You can do things like

`dnf list clang-tools-extra`

---

<div class="post-metadata">

**Author:** ![sspencerwire](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sspencerwire](https://forums.rockylinux.org/u/sspencerwire)\
**Post date:** [December 18, 2024, 3:19pm UTC](https://forums.rockylinux.org/t/installing-clang-format-for-use-in-vs-code/16897/3 "2024-12-18T15:19:04Z")

</div>

Hi @dyostbh ,  
This package is part of the appstream respository, so you should be able to install it with:

```auto
sudo dnf install clang-tools-extra

```

Cheers!  
Steve

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [February 16, 2025, 3:19pm UTC](https://forums.rockylinux.org/t/installing-clang-format-for-use-in-vs-code/16897/4 "2025-02-16T15:19:19Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
