安装chrony时没有可用的软件包chrony

时间:2018-08-30 07:44:15

标签: centos6 yum ntp

在我的Centos 6.5中,我想安装chrony

# yum install chrony

我收到以下错误

  

已加载的插件:最快的镜像从缓存中加载镜像速度   hostfile设置安装过程没有可用的软件包时间。   错误:没事

如何在Centos 6.5上安装Chrony?

非常感谢您为解决这个问题提供的帮助。

1 个答案:

答案 0 :(得分:2)

听起来好像您从安装中丢失了base.repo

Available Packages
Name        : chrony
Arch        : x86_64
Version     : 2.1.1
Release     : 2.el6_8
Size        : 266 k
Repo        : base
Summary     : An NTP client/server
URL         : http://chrony.tuxfamily.org
License     : GPLv2
Description : A client/server for the Network Time Protocol, this program keeps your
            : computer's clock accurate. It was specially designed to support
            : systems with intermittent internet connections, but it also works well
            : in permanently connected environments. It can use also hardware reference
            : clocks, system real-time clock or manual input as time references.

听起来您可能缺少配置中的“ CentOS-Base”存储库。检入/etc/yum.repos.d/CentOS-Base.repo(如果不存在),然后创建它并添加以下配置块;

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates 
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

您还可以通过http://rpm.pbone.net

查找该软件包