CentOS中Yum缺少软件包bash-completion


16

我正在尝试使Tab-completion在CentOS 6的Yum中工作(所以我可以做类似的事情yum install firefo<TAB>然后找回去firefox),并且我发现很多教程说可以简单地做到这一点yum install bash-completion,但是当我这样做时,我就得到了:

Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: mirror.anl.gov
 * extras: yum.singlehop.com
 * updates: mirror.ubiquityservers.com
Setting up Install Process
No package bash-completion available.
Error: Nothing to do

我应该添加一些存储库吗?

Answers:




4
  1. 下载bash-completionRPM

    wget http://www.caliban.org/files/redhat/RPMS/noarch/bash-completion-20060301-1.noarch.rpm

  2. 安装RPM

    rpm -ivh bash-completion-20060301-1.noarch.rpm

  3. 执行命令

    . /etc/bash_completion

  4. 现在您可以尝试自动补全

    yum ins — [TAB][TAB]

编辑:对于Centos 6,您可以获取此RPM


从不受信任的来源安装未签名的软件包存在巨大的安全风险。
吉通哥亚'17

1

如果您没有安装EPEL,请先运行:

yum install epel-release

然后运行以下命令:

yum install bash-completion --enablerepo=epel

安装后,您必须注销/登录才能开始工作。要在当前会话中开始使用它,请使用以下.命令将其来源:

. /etc/bash_completion
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.