Reputation: 856
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
Upvotes: 3
Views: 12142
Reputation: 111
First Enable EPEL (Extra Packages for Enterprise Linux) repo on CentOS 8 to install extra packages such xclip.
Step 1: Install epel repo
# yum install epel-release.noarch
or
# dnf install epel-release
Step 2: Install xclip from the EPEL repo
# 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
Upvotes: 3
Reputation: 2077
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.
sudo yum install libXmu-devel libX11-devel
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.
Upvotes: 1
Reputation: 3037
You can compile from yourself:
# Obtain the sourcecode
git clone https://github.com/astrand/xclip.git
./bootstrap
./configure
make
make install
Verify that is installed:
man xclip
Upvotes: 3