【问题标题】:How can I update my PHP 5.3.3 to PHP 5.3.8 Linux Centos如何将我的 PHP 5.3.3 更新到 PHP 5.3.8 Linux Centos
【发布时间】:2013-10-04 05:16:48
【问题描述】:

我想将我的 php 5.3.3 更新到 php 5.3.8,我已经下载了 PHP5.3.8.tar.gzip

我的 PHP 5.3.3 位于 /usr/bin/php。当我尝试安装 PHP5.3.8.tar.gzip 并执行以下命令时:

./configure
make
make install

它安装在不同的位置/usr/local/bin/php

所以现在我有 2 个 php 5.3.3php 5.3.8。所以我尝试再次安装并运行它

./configure -prefix=/usr/bin/php
make
make install

这次发生了错误:

Installing PHP SAPI module:       cgi
mkdir: cannot create directory `/usr/bin/php': File exists
mkdir: cannot create directory `/usr/bin/php/bin': Not a directory
make: [install-sapi] Error 1 (ignored)
Installing PHP CGI binary: /usr/bin/php/bin/
cp: accessing `/usr/bin/php/bin/#INST@29239#': Not a directory
make: *** [install-sapi] Error 1

请帮帮我,我想删除我安装在/usr/local/bin/php中的php5.3.8 并将 /usr/bin/php 更新为 php5.3.8。我只需要php5.3.8版本。

谢谢。

【问题讨论】:

  • @jetawe 我正在使用 Centos 6。我希望我的 php 5.3.3 升级到 5.3.8。
  • 您正在覆盖 centos 安装的 PHP。通常不是一个好主意。
  • @Marc B 那我该怎么办?你能帮帮我吗?

标签: php linux centos6


【解决方案1】:

一般在 CentOS 上,你想把这种事情留给 yum。

yum update php

sudo yum update php

您还可以将安装替换为较新的版本。 5.3.X 不再支持,所以你可以这样做:

yum install yum-plugin-replace
yum replace php --replace-with php55

如果 yum 中没有 php 5.5,请先这样做:

cd ~
wget http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/epel-release-6-5.noarch.rpm
wget http://dl.iuscommunity.org/pub/ius/stable/CentOS/6/x86_64/ius-release-1.0-11.ius.centos6.noarch.rpm
rpm -Uvh epel-release-6-5.noarch.rpm ius-release-1.0-11.ius.centos6.noarch.rpm

如果你没有安装 wget:

yum install wget

请注意所有其他通过 GOOGLE 找到此内容的人!!!

我在 wget 命令中链接的 URL 是 CentOS 6 的 epel 和 ius 存储库的当前版本。 (它也可能已经过时了。)

如果您有 RHEL 或 CentOS 5,您可以在此处找到您的 RPM 的特定链接:http://dl.iuscommunity.org/pub/ius/stable/

【讨论】:

    【解决方案2】:

    为什么特别需要 5.3.8? 5.3 的最后一个版本是 5.3.27。 5.3 是end-of-life。我会找到像remi 这样的现代存储库并使用 yum 安装 5.4 或更高版本

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-12-20
      • 2015-08-27
      • 1970-01-01
      • 2014-07-26
      • 1970-01-01
      • 2012-06-11
      • 2017-11-18
      相关资源
      最近更新 更多