我最近开始在我的工作站上使用CentOS8,没有xsel或xclip
是不是有什么问题,或者是故意的,xclip不可用?
这是dnf repolist的输出,也许我遗漏了一些必备的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发布于 2019-12-18 05:28:23
你可以自己编译:
# Obtain the sourcecode
git clone https://github.com/astrand/xclip.git
./bootstrap
./configure
make
make install验证是否已安装:
man xclip发布于 2020-02-08 18:14:10
在CentOS8中运行pyperclip.copy("Hello")时,我发现Centos8没有xclip,所以软件包给了我错误。我已经搜索了所有的包,但是Centos8的存储库没有任何类似的包。
我在下面的步骤中解决了这个问题。
安装libXmu和X11开发库
sudo yum install libXmu devel libX11-devel
获取源码
git克隆https://github.com/astrand/xclip.git
./bootstrap
./configure
制作
sudo make install
然后测试安装man xclip
现在我可以在python中使用pyperclip来使用剪贴板了。
https://stackoverflow.com/questions/59322033
复制相似问题