I recently started using Centos 8 on my Workstation and there is no xsel
or xclip
Is there something wrong or is it on purpose, that xclip
is not available?
Here is the output of dnf repolist
, maybe I’m missing some must-have repo?
repo id repo name status
AppStream CentOS-8 - AppStream 5.089
Atom Atom Editor 142
BaseOS CentOS-8 - Base 2.843
amdgpu-pro-local AMD amdgpu Pro local repository 70
docker-ce-stable Docker CE Stable - x86_64 57
*epel Extra Packages for Enterprise Linux 8 - x86_64 3.643
extras CentOS-8 - Extras 3
virtualbox Oracle Linux / RHEL / CentOS-8 / x86_64 - VirtualBox 4
3
Answers
You can compile from yourself:
Verify that is installed:
In Centos 8 while running pyperclip.copy("Hello"), I found centos 8 don’t have xclip and so the package gives me error.
I have search all packages but repository of Centos8 don’t have any similar packages.
I resolve this in following steps.
Install libXmu and X11 development library
sudo yum install libXmu-devel libX11-devel
Obtain the sourcecode
git clone https://github.com/astrand/xclip.git
./bootstrap
./configure
make
sudo make install
Then test install
man xclip
Now I can use pyperclip in python to use clipboard.
First Enable EPEL (Extra Packages for Enterprise Linux) repo on CentOS 8 to install extra packages such xclip.
Step 1: Install epel repo
Step 2: Install xclip from the EPEL repo