dpcwz210393 2013-09-27 19:32
浏览 44

如何将PHP 5.3.3更新为PHP 5.3.8 Linux Centos

I want to update my php 5.3.3 to php 5.3.8, I already downloaded PHP5.3.8.tar.gzip.

My PHP 5.3.3 located in /usr/bin/php. When I try to install PHP5.3.8.tar.gzip and do this command:

./configure
make
make install

It installed in different location /usr/local/bin/php.

So now I have 2 php 5.3.3 and php 5.3.8. So I try to install it again and run this

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

This time an error occurred:

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

Please help me, I want to delete the php5.3.8 I installed in /usr/local/bin/php and update the /usr/bin/php to php5.3.8. I need php5.3.8 version only.

Thanks.

  • 写回答

2条回答 默认 最新

  • doufeiqiong3515 2013-09-27 20:10
    关注

    Generally on CentOS, you want to leave this sort of thing to yum.

    yum update php
    

    or

    sudo yum update php
    

    You can also replace the installation with a newer version. 5.3.X is not supported any longer, so you could do:

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

    If you don't have php 5.5 in yum, first do this:

    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
    

    If you don't have wget installed:

    yum install wget
    

    PLEASE NOTE FOR ALL OTHERS FINDING THIS THROUGH GOOGLE!!!

    The URL's that I linked in the wget commands are the current releases of the epel and ius repos for CentOS 6. (It may also be out of date.)

    If you have RHEL or CentOS 5, you can find the specific link for your RPM here: http://dl.iuscommunity.org/pub/ius/stable/

    评论

报告相同问题?

悬赏问题

  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端