How To Install opam on Fedora 34

opam is Source-based package manager for OCaml

Introduction

In this tutorial we learn how to install opam on Fedora 34.

What is opam

Opam is a source-based package manager for OCaml. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.

We can use yum or dnf to install opam on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install opam.

Install opam on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install opam using dnf by running the following command:

sudo dnf -y install opam

Install opam on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install opam using yum by running the following command:

sudo yum -y install opam

How To Uninstall opam on Fedora 34

To uninstall only the opam package we can use the following command:

sudo dnf remove opam

opam Package Contents on Fedora 34

/usr/bin/opam
/usr/lib/.build-id
/usr/lib/.build-id/3b
/usr/lib/.build-id/3b/8dfa44b82d7a5269d724cb45cdd007e2ecba04
/usr/share/licenses/opam
/usr/share/licenses/opam/LICENSE
/usr/share/man/man1/opam-admin-add-constraint.1.gz
/usr/share/man/man1/opam-admin-add-hashes.1.gz
/usr/share/man/man1/opam-admin-cache.1.gz
/usr/share/man/man1/opam-admin-check.1.gz
/usr/share/man/man1/opam-admin-filter.1.gz
/usr/share/man/man1/opam-admin-help.1.gz
/usr/share/man/man1/opam-admin-index.1.gz
/usr/share/man/man1/opam-admin-lint.1.gz
/usr/share/man/man1/opam-admin-list.1.gz
/usr/share/man/man1/opam-admin-make.1.gz
/usr/share/man/man1/opam-admin-upgrade.1.gz
/usr/share/man/man1/opam-admin.1.gz
/usr/share/man/man1/opam-clean.1.gz
/usr/share/man/man1/opam-config.1.gz
/usr/share/man/man1/opam-env.1.gz
/usr/share/man/man1/opam-exec.1.gz
/usr/share/man/man1/opam-help.1.gz
/usr/share/man/man1/opam-info.1.gz
/usr/share/man/man1/opam-init.1.gz
/usr/share/man/man1/opam-install.1.gz
/usr/share/man/man1/opam-lint.1.gz
/usr/share/man/man1/opam-list.1.gz
/usr/share/man/man1/opam-pin.1.gz
/usr/share/man/man1/opam-reinstall.1.gz
/usr/share/man/man1/opam-remote.1.gz
/usr/share/man/man1/opam-remove.1.gz
/usr/share/man/man1/opam-repository.1.gz
/usr/share/man/man1/opam-search.1.gz
/usr/share/man/man1/opam-show.1.gz
/usr/share/man/man1/opam-source.1.gz
/usr/share/man/man1/opam-switch.1.gz
/usr/share/man/man1/opam-uninstall.1.gz
/usr/share/man/man1/opam-unpin.1.gz
/usr/share/man/man1/opam-update.1.gz
/usr/share/man/man1/opam-upgrade.1.gz
/usr/share/man/man1/opam-var.1.gz
/usr/share/man/man1/opam.1.gz
/usr/bin/opam
/usr/lib/.build-id
/usr/lib/.build-id/95
/usr/lib/.build-id/95/62560f9ab0f56d368b11d1447db8002dfaabb5
/usr/share/licenses/opam
/usr/share/licenses/opam/LICENSE
/usr/share/man/man1/opam-admin-add-constraint.1.gz
/usr/share/man/man1/opam-admin-add-hashes.1.gz
/usr/share/man/man1/opam-admin-cache.1.gz
/usr/share/man/man1/opam-admin-check.1.gz
/usr/share/man/man1/opam-admin-filter.1.gz
/usr/share/man/man1/opam-admin-help.1.gz
/usr/share/man/man1/opam-admin-index.1.gz
/usr/share/man/man1/opam-admin-lint.1.gz
/usr/share/man/man1/opam-admin-list.1.gz
/usr/share/man/man1/opam-admin-make.1.gz
/usr/share/man/man1/opam-admin-upgrade.1.gz
/usr/share/man/man1/opam-admin.1.gz
/usr/share/man/man1/opam-clean.1.gz
/usr/share/man/man1/opam-config.1.gz
/usr/share/man/man1/opam-env.1.gz
/usr/share/man/man1/opam-exec.1.gz
/usr/share/man/man1/opam-help.1.gz
/usr/share/man/man1/opam-info.1.gz
/usr/share/man/man1/opam-init.1.gz
/usr/share/man/man1/opam-install.1.gz
/usr/share/man/man1/opam-lint.1.gz
/usr/share/man/man1/opam-list.1.gz
/usr/share/man/man1/opam-pin.1.gz
/usr/share/man/man1/opam-reinstall.1.gz
/usr/share/man/man1/opam-remote.1.gz
/usr/share/man/man1/opam-remove.1.gz
/usr/share/man/man1/opam-repository.1.gz
/usr/share/man/man1/opam-search.1.gz
/usr/share/man/man1/opam-show.1.gz
/usr/share/man/man1/opam-source.1.gz
/usr/share/man/man1/opam-switch.1.gz
/usr/share/man/man1/opam-uninstall.1.gz
/usr/share/man/man1/opam-unpin.1.gz
/usr/share/man/man1/opam-update.1.gz
/usr/share/man/man1/opam-upgrade.1.gz
/usr/share/man/man1/opam-var.1.gz
/usr/share/man/man1/opam.1.gz

References

Summary

In this tutorial we learn how to install opam on Fedora 34 using yum and dnf.