Can't install PHP Package on CentOS

前端 未结 3 1009
不思量自难忘°
不思量自难忘° 2021-01-12 06:25

I am having trouble re-installing PHP via yum on my server hosted by digital ocean.

I had PHP 5.4 installed but wanted 5.6. I added/enabled the remi repo\'s, ran

3条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-12 06:50

    Though this probably suits serverfault or poweruser better, I will still answer.

    This is based from experience and works every single time if done as instructed.

    To install, first you must add the Webtatic EL yum repository information corresponding to your CentOS/RHEL version to yum:

    CentOS/RHEL 7.x:

    rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
    rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
    

    Then you can install each of your individual packages like this:

    yum install php56w-
    

    Don't forget the php56w prefix though.

    Source: https://webtatic.com/packages/php56/


    Try this (in regards to the comments):

    yum update -y; yum remove httpd && yum install httpd; yum install php56w-common php56w-opcache php56w-mysql
    

提交回复
热议问题