我正在尝试在 PHP 5.3、CentOS 5 上安装 mbstring 模块。
$ yum install mbstring
--> Missing Dependency: php-common = 5.2.10-1.el5.centos for package: php-mbstring
我执行了 rpm -qa 并发现我已安装 php-common-5.3.8-1.w5。如何使用这个较新的 php-common 安装 mbstring?我应该注意到 php 运行正常,只是尝试安装此模块。
谢谢。
grep base /etc/yum.repos.d/*
$ grep base /etc/yum.repos.d/*
/etc/yum.repos.d/CentOS-Base.repo:# remarked out baseurl= line instead.
/etc/yum.repos.d/CentOS-Base.repo:[base]
/etc/yum.repos.d/CentOS-Base.repo:mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
/etc/yum.repos.d/CentOS-Base.repo:#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
/etc/yum.repos.d/CentOS-Base.repo:mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
/etc/yum.repos.d/CentOS-Base.repo:#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
/etc/yum.repos.d/CentOS-Base.repo:mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
/etc/yum.repos.d/CentOS-Base.repo:#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
/etc/yum.repos.d/CentOS-Base.repo:mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
/etc/yum.repos.d/CentOS-Base.repo:#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
/etc/yum.repos.d/CentOS-Base.repo:mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
/etc/yum.repos.d/CentOS-Base.repo:#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
/etc/yum.repos.d/CentOS-Debuginfo.repo:baseurl=http://debuginfo.centos.org/5/$basearch/
/etc/yum.repos.d/CentOS-Media.repo:baseurl=file:///media/CentOS/
/etc/yum.repos.d/CentOS-Testing.repo:baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:[C5.5-base]
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.5/os/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.5/updates/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.5/extras/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.5/centosplus/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:[C5.4-base]
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.4/os/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.4/updates/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.4/extras/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.4/centosplus/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:[C5.3-base]
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.3/os/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.3/updates/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.3/extras/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.3/centosplus/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:[C5.2-base]
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.2/os/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.2/updates/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.2/extras/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.2/centosplus/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:[C5.1-base]
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.1/os/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.1/updates/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.1/extras/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.1/centosplus/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:[C5.0-base]
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.0/os/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.0/updates/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.0/extras/$basearch/
/etc/yum.repos.d/CentOS-Vault.repo:baseurl=http://vault.centos.org/5.0/centosplus/$basearch/
/etc/yum.repos.d/CentOS.repo:# remarked out baseurl= line instead.
/etc/yum.repos.d/CentOS.repo:[base]
/etc/yum.repos.d/CentOS.repo:mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
/etc/yum.repos.d/CentOS.repo:#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
/etc/yum.repos.d/CentOS.repo:mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
/etc/yum.repos.d/CentOS.repo:#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
/etc/yum.repos.d/CentOS.repo:mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
/etc/yum.repos.d/CentOS.repo:#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
/etc/yum.repos.d/CentOS.repo:mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
/etc/yum.repos.d/CentOS.repo:#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
/etc/yum.repos.d/CentOS.repo:mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
/etc/yum.repos.d/CentOS.repo:#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
/etc/yum.repos.d/CentOS.repo:mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
/etc/yum.repos.d/CentOS.repo:#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
/etc/yum.repos.d/epel-testing.repo:name=Extra Packages for Enterprise Linux 5 - Testing - $basearch
/etc/yum.repos.d/epel-testing.repo:#baseurl=http://download.fedoraproject.org/pub/epel/testing/5/$basearch
/etc/yum.repos.d/epel-testing.repo:mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=testing-epel5&arch=$basearch
/etc/yum.repos.d/epel-testing.repo:name=Extra Packages for Enterprise Linux 5 - Testing - $basearch - Debug
/etc/yum.repos.d/epel-testing.repo:#baseurl=http://download.fedoraproject.org/pub/epel/testing/5/$basearch/debug
/etc/yum.repos.d/epel-testing.repo:mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=testing-debug-epel5&arch=$basearch
/etc/yum.repos.d/epel-testing.repo:name=Extra Packages for Enterprise Linux 5 - Testing - $basearch - Source
/etc/yum.repos.d/epel-testing.repo:#baseurl=http://download.fedoraproject.org/pub/epel/testing/5/SRPMS
/etc/yum.repos.d/epel-testing.repo:mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=testing-source-epel5&arch=$basearch
/etc/yum.repos.d/epel.repo:name=Extra Packages for Enterprise Linux 5 - $basearch
/etc/yum.repos.d/epel.repo:#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch
/etc/yum.repos.d/epel.repo:mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=$basearch
/etc/yum.repos.d/epel.repo:name=Extra Packages for Enterprise Linux 5 - $basearch - Debug
/etc/yum.repos.d/epel.repo:#baseurl=http://download.fedoraproject.org/pub/epel/5/$basearch/debug
/etc/yum.repos.d/epel.repo:mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-5&arch=$basearch
/etc/yum.repos.d/epel.repo:name=Extra Packages for Enterprise Linux 5 - $basearch - Source
/etc/yum.repos.d/epel.repo:#baseurl=http://download.fedoraproject.org/pub/epel/5/SRPMS
/etc/yum.repos.d/epel.repo:mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-5&arch=$basearch
/etc/yum.repos.d/remi.repo:name=Les RPM de remi pour Enterprise Linux $releasever - $basearch
/etc/yum.repos.d/remi.repo:#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/
/etc/yum.repos.d/remi.repo:name=Les RPM de remi en test pour Enterprise Linux $releasever - $basearch
/etc/yum.repos.d/remi.repo:#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/test/$basearch/
/etc/yum.repos.d/scalr.repo:baseurl=http://rpm.scalr.net/rpm/rhel/$releasever/$basearch
/etc/yum.repos.d/webtatic.repo:name=Webtatic Repository $releasever - $basearch
/etc/yum.repos.d/webtatic.repo:#baseurl=http://repo.webtatic.com/yum/centos/5/$basearch/
/etc/yum.repos.d/webtatic.repo:mirrorlist=http://repo.webtatic.com/yum/centos/5/$basearch/mirrorlist
/etc/yum.repos.d/webtatic.repo:name=Webtatic Repository $releasever - $basearch - Debug
/etc/yum.repos.d/webtatic.repo:#baseurl=http://repo.webtatic.com/yum/centos/5/$basearch/debug/
/etc/yum.repos.d/webtatic.repo:mirrorlist=http://repo.webtatic.com/yum/centos/5/$basearch/debug/mirrorlist
/etc/yum.repos.d/webtatic.repo:name=Webtatic Repository $releasever - $basearch
/etc/yum.repos.d/webtatic.repo:#baseurl=http://repo.webtatic.com/yum/centos/5/SRPMS/
答案1
假设您从中获取 PHP 的非标准 repo 也具有 php-mb 的 RPM:yum --disablerepo=epel install php-mbstring
答案2
您收到的错误表明 php-mbstring 包依赖于特定版本“5.2.10-1.el5.centos”的“php-common”包。
这可能意味着您正在尝试从标准 CentOS 基础存储库安装 php-mbstring RPM,但您似乎从其他地方获得了 php-common。
向我们显示“yum info php-mbstring”和“yum info php-common”的输出。