# Downloading and installing packages for Rocky Linux 9.4 with dnf

**URL:** <https://forums.rockylinux.org/t/downloading-and-installing-packages-for-rocky-linux-9-4-with-dnf/15203>\
**Category:** Rocky Linux Help & Support\
**Created:** [July 25, 2024, 2:32pm UTC](https://forums.rockylinux.org/t/downloading-and-installing-packages-for-rocky-linux-9-4-with-dnf/15203 "2024-07-25T14:32:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhi](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@jhi](https://forums.rockylinux.org/u/jhi)\
**Post date:** [July 25, 2024, 2:32pm UTC](https://forums.rockylinux.org/t/downloading-and-installing-packages-for-rocky-linux-9-4-with-dnf/15203/1 "2024-07-25T14:32:34Z")

</div>

I’m fairly new to Rocky Linux 9.4 and need a little help with dnf commands installing packages called “libcanber-gtk2”, and “PackageKit-gtk3-module”. I have a 486 processor and am a little confused as to what specific version of this software is needed for Rocky Linux 9.4. when I do a

dnf download --url libcan\*  
I get a very nice listing as follows

ocky Linux 9 - BaseOS 8.0 kB/s | 4.1 kB 00:00  
Rocky Linux 9 - BaseOS 3.3 MB/s | 2.3 MB 00:00  
Rocky Linux 9 - AppStream 28 kB/s | 4.5 kB 00:00  
Rocky Linux 9 - AppStream 7.6 MB/s | 7.9 MB 00:01  
Rocky Linux 9 - Extras 17 kB/s | 2.9 kB 00:00  
[http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86\_64/os/Packages/l/libcanberra-gtk3-0.30-27.el9.x86\_64.rpm](http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86_64/os/Packages/l/libcanberra-gtk3-0.30-27.el9.x86_64.rpm)  
[http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86\_64/os/Packages/l/libcanberra-gtk2-0.30-27.el9.x86\_64.rpm](http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86_64/os/Packages/l/libcanberra-gtk2-0.30-27.el9.x86_64.rpm)  
[http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86\_64/os/Packages/l/libcanberra-devel-0.30-27.el9.x86\_64.rpm](http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86_64/os/Packages/l/libcanberra-devel-0.30-27.el9.x86_64.rpm)  
[http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86\_64/os/Packages/l/libcanberra-0.30-27.el9.x86\_64.rpm](http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86_64/os/Packages/l/libcanberra-0.30-27.el9.x86_64.rpm)  
[http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86\_64/os/Packages/l/libcanberra-gtk3-0.30-27.el9.i686.rpm](http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86_64/os/Packages/l/libcanberra-gtk3-0.30-27.el9.i686.rpm)  
[http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86\_64/os/Packages/l/libcanberra-gtk2-0.30-27.el9.i686.rpm](http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86_64/os/Packages/l/libcanberra-gtk2-0.30-27.el9.i686.rpm)  
[http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86\_64/os/Packages/l/libcanberra-devel-0.30-27.el9.i686.rpm](http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86_64/os/Packages/l/libcanberra-devel-0.30-27.el9.i686.rpm)  
[http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86\_64/os/Packages/l/libcanberra-0.30-27.el9.i686.rpm](http://iad.mirror.rackspace.com/rocky/9.4/AppStream/x86_64/os/Packages/l/libcanberra-0.30-27.el9.i686.rpm)

The Question is what dnf command downloads these files (specifics here) from what source. Next question is what dnf command is needed to install them?

Thanks

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [July 25, 2024, 2:58pm UTC](https://forums.rockylinux.org/t/downloading-and-installing-packages-for-rocky-linux-9-4-with-dnf/15203/2 "2024-07-25T14:58:24Z")

</div>

One does not usually “download”. There are “repositories” defined for DNF.  
Your output shows that you have ‘baseos’, ‘appstream’, and ‘extras’ defined (and enabled).

For each of these, the DNF contacts a “mirrorlist” server (all repos do not have one, just an URL),  
which returns URLs to mirror sites near you – closest copy of packages. If/when you ask to download or install a package, DNF fetches it from such server.

The `dnf install` does automatically download the package and then installs it. (The downloaded copy stays in cache for a while.) If the package requires other packages that are not installed yet, they are automatically installed in the same transaction.

If you have downloaded an RPM-package, say “libcanberra-0.30-27.el9.x86\_64.rpm”, you can install that local file with `dnf install libcanberra-0.30-27.el9.x86_64.rpm` but since it is on repo, one does not need to download.

You can see what is on enabled repositories (and/or installed) with:

```auto
dnf list libcan\*

```

* * *

To install package “PackageKit-gtk3-module”, one would do:

```auto
sudo dnf install PackageKit-gtk3-module

```

---

<div class="post-metadata">

**Author:** ![jhi](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@jhi](https://forums.rockylinux.org/u/jhi)\
**Post date:** [July 26, 2024, 1:05am UTC](https://forums.rockylinux.org/t/downloading-and-installing-packages-for-rocky-linux-9-4-with-dnf/15203/3 "2024-07-26T01:05:57Z")

</div>

Thank you so much. I do the  
sudo dnf install libcanberra-gtk\*  
and  
sudo dnf install PackageKit\*

Usually the return on these is “Package blaa blaa is already installed”.

When I issue the command  
dpkg -l | grep libgtk  
this command returns nothing.  
Is this command correct? If not what is the command to tell whats installed?  
Thank you

---

<div class="post-metadata">

**Author:** ![label](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@label](https://forums.rockylinux.org/u/label)\
**Post date:** [July 26, 2024, 5:39am UTC](https://forums.rockylinux.org/t/downloading-and-installing-packages-for-rocky-linux-9-4-with-dnf/15203/4 "2024-07-26T05:39:15Z")

</div>

> [@jhi](#):
>
> dpkg -l | grep libgtk

dpkg is a debian command. `rpm -qa | grep libgtk` is the equivalent.

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [July 26, 2024, 7:20am UTC](https://forums.rockylinux.org/t/downloading-and-installing-packages-for-rocky-linux-9-4-with-dnf/15203/5 "2024-07-26T07:20:22Z")

</div>

The `something | grep word` is the Unix Way; filter output of _something_ with `grep`.  
Rocky does have a second _something_ (in addition to `rpm -qa`) for listing installed packages:

```auto
dnf list installed

```

* * *

For filtering, both `rpm` and `dnf` do support globs (so grep is not needed):

```auto
rpm -qa \*libgtk\*
dnf list installed \*libgtk\*

```

* * *

> [@jhi](#):
>
> Usually the return on these is “Package blaa blaa is already installed”.

This is convenient; already installed package is not installed again.  
There is `dnf reinstall PackageKit*` for doing that (for installed packages that do match the ‘PackageKit\*’).

However, if repository has newer version of package than what is already installed, then the update will install.

---

<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:** [September 24, 2024, 7:20am UTC](https://forums.rockylinux.org/t/downloading-and-installing-packages-for-rocky-linux-9-4-with-dnf/15203/6 "2024-09-24T07:20:30Z")

</div>

Closed on September 24, 2024, 7:20am UTC

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