我正在尝试安装Apache httpd,但它失败
root@web [/]# yum install httpd Loaded plugins: downloadonly, fastestmirror, replace Loading mirror speeds from cached hostfile * epel: mirror.compevo.com * remi-php56: mirror.pw * remi-test: mirror.pw * List item Setting up Install Process No package httpd available. Error: Nothing to do
编辑 :这是repolist
root@web [/]# yum repolist Loaded plugins: downloadonly, fastestmirror, replace Loading mirror speeds from cached hostfile epel/metalink | 16 kB 00:00 * epel: mirror.compevo.com * remi-php56: mirror.pw * remi-test: mirror.pw remi-debuginfo | 2.9 kB 00:00 remi-php55-debuginfo | 2.9 kB 00:00 remi-php56 | 2.9 kB 00:00 remi-php56-debuginfo | 2.9 kB 00:00 remi-test | 2.9 kB 00:00 remi-test-debuginfo | 2.9 kB 00:00 repo id repo name status epel Extra Packages for Enterprise Linux 6 - x86_64 10,217+881 remi-debuginfo Les RPM de remi pour Enterprise Linux 6 - x86_64 - debugin 31+550 remi-php55-debuginfo Les RPM de remi de PHP 5.5 pour Enterprise Linux 6 - x86_6 0+207 remi-php56 Les RPM de remi de PHP 5.6 pour Enterprise Linux 6 - x86_6 6+316 remi-php56-debuginfo Les RPM de remi de PHP 5.6 pour Enterprise Linux 6 - x86_6 0+215 remi-test Les RPM de remi en test pour Enterprise Linux 6 - x86_64 29+66 remi-test-debuginfo Les RPM de remi en test pour Enterprise Linux 6 - x86_64 - 4+16 repolist: 10,287 root@web [/]# cat /etc/yum.repos.d/CentOS-Base.repo cat: /etc/yum.repos.d/CentOS-Base.repo: No such file or directory root@web [/]#
我使用链接http://www.if-not-true-then-false.com/2010/install-apache-php-on-fedora-centos-red-hat-rhel/来安装
我下载了centos-release-6-5并使用rpm -ivh进行安装。 结果如下
root@web [/]# rpm -ivh http://anorien.csc.warwick.ac.uk/mirrors/centos/6.5/os/x86_64/Packages/centos-release-6-5.el6.centos.11.1.x86_64.rpm Retrieving anorien.csc.warwick.ac.uk/mirrors/centos/6.5/os/x86_64/Packages/centos-release-6-5.el6.centos.11.1.x86_64.rpm Preparing... ########################################### [100%] package centos-release-6-5.el6.centos.11.2.x86_64 (which is newer than centos-release-6-5.el6.centos.11.1.x86_64) is already installed file /etc/yum.repos.d/CentOS-Vault.repo from install of centos-release-6-5.el6.centos.11.1.x86_64 conflicts with file from package centos-release-6-5.el6.centos.11.2.x86_64
我尝试使用-Uvh,结果是一样的
root@web [/]# rpm -Uvh centos-release-6-5.el6.centos.11.1.x86_64.rpm Preparing... ########################################### [100%] package centos-release-6-5.el6.centos.11.2.x86_64 (which is newer than centos-release-6-5.el6.centos.11.1.x86_64) is already installed root@web [/]#
我不知道如何,但有人设法删除您的base和updates回购,这给你的操作系统本身。 你只剩下一大堆扩展的回购版,可以提供更多的某些工具的最新版本。 这是行不通的。
拥有你需要的repo文件的软件包叫做centos-release-6-5 ,你最好的办法就是从其中一个镜像中获取它。 这是一个小文件,所以它并不重要。 尝试下载http://anorien.csc.warwick.ac.uk/mirrors/centos/6.5/os/x86_64/Packages/centos-release-6-5.el6.centos.11.1.x86_64.rpm并使用rpm -Uvh --oldpackage安装rpm -Uvh --oldpackage ; 这应该给你的基础和更新回购,之后安装httpd和做一般的updates应该更好地工作。
如果你想成为这里的常客,请学习使用我们的标记系统。 这很简单。