【问题标题】:webtatic php mbstring add module to centos6.6webtatic php mbstring 添加模块到centos6.6
【发布时间】:2015-02-21 16:35:57
【问题描述】:

我一直在使用 webtatic php 5.4.34 版本来开发 facebook 应用程序,但由于这个错误而突然停止 —————————- PHP 致命错误:在第 306 行的 /var/www/html/facebook/src/Facebook/HttpClients/FacebookCurlHttpClient.php 中调用未定义函数 Facebook\HttpClients\mb_strlen() —————————-

它需要 mbstring 模块(这是添加到 facebook php 函数以解决 http 标头问题并且不能被注释掉,我希望这样做)

Webtatic 指令提到了安装中的一个点,我可能有机会选择要安装的 php 模块,但是已经安装了 php54w,我决定升级到 php56w,希望能出现这个使用 mbstring 的选项。

所以我现在已经升级到 centos 6.6,然后尝试安装 php56w,但得到这个众所周知的错误:php56w-common 与 php54w-common-5.4.34-1.w6.x86_64 冲突。

该解决方案适用于 php54w,但正如您这次无法看到的,您能否提出修复建议

另外,有没有更好的方法来解决缺少的 mbstring 模块

[root@SECURE21 html]# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
Retrieving https://mirror.webtatic.com/yum/el6/latest.rpm
Preparing… ########################################### [100%]
package webtatic-release-6-5.noarch is already installed
[root@SECURE21 html]#
[root@SECURE21 html]#
[root@SECURE21 html]# yum install php56w php56w-opcache
Loaded plugins: fastestmirror, replace
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: anorien.csc.warwick.ac.uk
* extras: mirror.econdc.com
* updates: centos.openitc.uk
* webtatic: uk.repo.webtatic.com
Resolving Dependencies
–> Running transaction check
—> Package php56w.x86_64 0:5.6.2-1.w6 will be installed
–> Processing Dependency: php56w-common(x86-64) = 5.6.2-1.w6 for package: php56w-5.6.2-1.w6.x86_64
–> Processing Dependency: php56w-cli(x86-64) = 5.6.2-1.w6 for package: php56w-5.6.2-1.w6.x86_64
–> Processing Dependency: php56w-cli = 5.6.2-1.w6 for package: php56w-5.6.2-1.w6.x86_64
—> Package php56w-opcache.x86_64 0:5.6.2-1.w6 will be installed
–> Running transaction check
—> Package php56w-cli.x86_64 0:5.6.2-1.w6 will be installed
—> Package php56w-common.x86_64 0:5.6.2-1.w6 will be installed
–> Processing Conflict: php56w-common-5.6.2-1.w6.x86_64 conflicts php-common Finished Dependency Resolution
Error: php56w-common conflicts with php54w-common-5.4.34-1.w6.x86_64
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest
[root@SECURE21 html]#
[root@SECURE21 html]#
[root@SECURE21 html]# yum install yum-plugin-replace
Loaded plugins: fastestmirror, replace
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: anorien.csc.warwick.ac.uk
* extras: mirror.econdc.com
* updates: mirror.for.me.uk
* webtatic: uk.repo.webtatic.com
Package yum-plugin-replace-0.2.7-1.ius.el6.noarch already installed and latest version
Nothing to do
[root@SECURE21 html]# yum replace –enablerepo=webtatic-testing php-common –replace-with=php56w-common
Loaded plugins: fastestmirror, replace
Replacing packages takes time, please be patient…
Error: Package ‘php-common’ is not installed.
[root@SECURE21 html]#

【问题讨论】:

  • 做完后试试> yum install php-common
  • 这种情况有点安静,你也可以尝试做一个 > yum erase php php-pear php-mysql php-cli php-common 并用 y 确认以摆脱旧的安装及其组件然后执行 > yum install php56
  • 我通过 yum install php54w-mbstring 修复了它。现在 facebook 代码运行良好。经过几个小时的深入观察,这一切都太明显了!

标签: php centos6 mbstring


【解决方案1】:

我通过 yum install php54w-mbstring 修复了它。现在 facebook 代码运行良好。经过几个小时的深入观察,这一切都太明显了!

【讨论】:

  • 太好了。这发生在我的几台服务器上几次,只有当我从较低版本的 php 升级到较高版本时才会发生这种情况。我第一次遇到冲突是因为我有旧版本的 php 残留物,我需要摆脱它然后通过在 centos 6 上获取正确的存储库来重新安装。有时我基本上必须获得正确的软件包才能安装对于某些应用程序而不会收到 php 警告。我很高兴你知道了。
猜你喜欢
  • 2012-02-16
  • 2013-04-17
  • 2018-12-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-11-24
  • 2012-01-18
  • 2013-12-30
相关资源
最近更新 更多