我正在尝试使用CentOs 6.3 precreated模板在OpenVZ容器上安装git。 当我尝试命令行
yum install git
我收到消息:
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: www.cubiculestudio.com * epel: mirror.csclub.uwaterloo.ca * extras: www.cubiculestudio.com * rpmforge: mirror.us.leaseweb.net * updates: www.cubiculestudio.com Setting up Install Process No package git available. Error: Nothing to do
据我所知,git软件包应该位于centos6基础库中: http ://pkgs.org/centos-6-rhel-6/centos-rhel-x86_64/git-1.7.1-2.el6_0.1.x86_64 .rpm.html
但它没有find它,我甚至有EPEL和RPMForge回购启用,但仍然无法findGIT包。
yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: www.cubiculestudio.com * epel: mirror.csclub.uwaterloo.ca * extras: www.cubiculestudio.com * rpmforge: mirror.us.leaseweb.net * updates: www.cubiculestudio.com repo id repo name status base CentOS-6 - Base 4,776 epel Extra Packages for Enterprise Linux 6 - i386 6,523 extras CentOS-6 - Extras 4 rpmforge RHEL 6 - RPMforge.net - dag 4,501 updates CentOS-6 - Updates 596 vz-base vz-base 3 vz-updates vz-updates 0 repolist: 16,403
最奇怪的是,我的OpenVZ服务器运行在CentOs 6.3上,我能够安装git而没有任何问题。
你能帮我理解为什么它找不到包?
先谢谢你。
您的VPS提供商已经禁用了默认的CentOS仓库,并用实际上不提供对基本系统软件包的访问的仓库replace它们。 这似乎是一个常见的OpenVZconfiguration问题。
我周围的工作:
/etc/yum.repos.d中的任何文件。 获取最新的centos-release RPM的干净的副本,并安装在现有的RPM上:
rpm -Uvh --replacefiles --replacepkgs centos-release-6*.rpm
长期的解决scheme可能是停止使用OpenVZ。 我还没有find一个公开的OpenVZ提供商,它pipe理一个体面的configuration。