How To Install clojure on CentOS 7

In this tutorial we learn how to install clojure on CentOS 7. clojure is A dynamic programming language that targets the Java Virtual

Introduction

In this tutorial we learn how to install clojure on CentOS 7.

What is clojure

Clojure is a dynamic programming language that targets the Java Virtual Machine. It is designed to be a general-purpose language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming. Clojure is a compiled language - it compiles directly to JVM bytecode, yet remains completely dynamic. Every feature supported by Clojure is supported at runtime. Clojure provides easy access to the Java frameworks, with optional type hints and type inference, to ensure that calls to Java can avoid reflection.

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

Install clojure on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install clojure

Install clojure 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 clojure using dnf by running the following command:

sudo dnf -y install clojure

How To Uninstall clojure on CentOS 7

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

sudo dnf remove clojure

References

Summary

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