How To Install ocaml-sexplib on CentOS 7

In this tutorial we learn how to install ocaml-sexplib on CentOS 7. ocaml-sexplib is OCaml library for converting OCaml values to S-expressions

Introduction

In this tutorial we learn how to install ocaml-sexplib on CentOS 7.

What is ocaml-sexplib

This library contains functionality for parsing and pretty-printing S-expressions. In addition to that it contains an extremely useful preprocessing module for Camlp4, which can be used to automatically generate code from type definitions for efficiently converting OCaml-values to S-expressions and vice versa. In combination with the parsing and pretty-printing functionality this frees users from having to write their own I/O-routines for datastructures they define. Possible errors during automatic conversions from S-expressions to OCaml-values are reported in a very human-readable way. Another module in the library allows you to extract and replace sub-expressions in S-expressions.

We can use yum or dnf to install ocaml-sexplib on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install ocaml-sexplib.

Install ocaml-sexplib on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install ocaml-sexplib using yum by running the following command:

sudo yum -y install ocaml-sexplib

Install ocaml-sexplib on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install ocaml-sexplib

How To Uninstall ocaml-sexplib on CentOS 7

To uninstall only the ocaml-sexplib package we can use the following command:

sudo dnf remove ocaml-sexplib

References

Summary

In this tutorial we learn how to install ocaml-sexplib on CentOS 7 using yum and dnf.