本文介绍了如何在EC2实例上安装xclip?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在遵循 Github添加SSH密钥的说明.我已经从我的AWS EC2实例生成了id_rsa.pub文件,但是由于无法将xclip安装到EC2实例上,因此无法完成使我使用xclip复制文件内容的步骤.

I'm following Github's instructions for adding an SSH key. I've generated the id_rsa.pub file from my AWS EC2 instance, but I cannot complete the step that has me copy the contents of the file using xclip because I cannot install xclip onto the EC2 instance.

  1. 我尝试使用 sudo yum install在EC2实例上安装xclipxclip ,但是没有用(没有可用的xclip包").
  2. 所以我环顾四周,发现更详细的安装说明,但他们也不起作用(卷曲:(22)请求的URL返回错误:404找不到"),并且注释中建议的正确URL也失败了.
  3. (我也尝试过使用Putty和ctl-c复制id_rsa.pub文件的文本内容,但是Github声明生成的密钥无效.)
  1. I tried to install xclip on the EC2 instance using sudo yum installxclip, but that didn't work ("No package xclip available").
  2. So I looked around and found more detailed install instructions, but theydidn't work either ("curl: (22) The requested URL returned error: 404 Not Found"), and the suggested correct URLs in the comments also failed.
  3. (I also tried just copying the text contents of the id_rsa.pub file using Putty and ctl-c, but Github declared the resulting key invalid.)

那么,如何在64位Amazon Linux AMI 2012.09上安装xclip?

So, how do I install xclip on 64-bit Amazon Linux AMI 2012.09?

推荐答案

我今天需要一个大于ssh-key的文件,而cat还不够.您需要在EC2中启用EPEL仓库才能获取xclip:

I needed this today for a file larger than a ssh-key, and cat was not enough. You need to enable the EPEL repo in EC2 in order to get xclip:

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo rpm -ivh epel-release-latest-7.noarch.rpm
sudo yum-config-manager --enable epel
sudo yum install xclip -y

这篇关于如何在EC2实例上安装xclip?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-10 19:38