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 MATLAB怎么通过柱坐标变换画开口是圆形的旋转抛物面?
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥30 用arduino开发esp32控制ps2手柄一直报错
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题