I recently started using CentOS 8 on my server and I couldn’t see the package xclip installed on CentOS 8 (below is the command not found error message). This article will help you to install xclip on CentOS 8.
# xclip -bash: xclip: command not found
How to install xclip on CentOS 8 using dnf
Firstly you need to install the EPEL (Extra Packages for Enterprise Linux) repository and enable it.
Step 1: Install EPEL Repo
# dnf install epel-release
Step 2: Install xclip
# dnf install xclip Last metadata expiration check: 0:06:09 ago on Mon 07 Feb 2022 10:39:39 AM IST. Dependencies resolved. ============================================================================================================================================================= Package Architecture Version Repository Size ============================================================================================================================================================= Installing: xclip x86_64 0.13-8.el8 epel 35 k Transaction Summary ============================================================================================================================================================= Install 1 Package
How to install xclip using source package
You can compile yourself from the source and install it as below:
Step 1: Install libXmu & X11 development library
# yum install libXmu-devel libX11-devel
Step 2: Obtain the source code
# git clone https://github.com/astrand/xclip.git
Step 3: Compile and Install at the default location
# cd xclip # ./bootstrap # ./configure # make # make install
Step 4: Verify the installation
# man xclip
That’s It!