Downloading and installing packages for Rocky Linux 9.4 with dnf

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-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-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-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-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

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:

dnf list libcan\*

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

sudo dnf install PackageKit-gtk3-module

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

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

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:

dnf list installed

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

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

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.

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