Update PHP with yum on Amazon Linux

28,849

Solution 1

OK, so I seem to have got this working. Not 100% sure how, but I think I had to erase php and httpd, then install php55. Not sure if I had to install httpd24 separately?

Solution 2

Worked for me:

yum remove php httpd php-cli php-xml php-common httpd-tools
yum install php55 php55-mysql php55-pdo
Share:
28,849

Related videos on Youtube

DatsunBing
Author by

DatsunBing

Updated on September 18, 2022

Comments

  • DatsunBing
    DatsunBing almost 2 years

    I have Amazon Linux on EC2, AMI 2013.09. I followed the LAMP install tutorial, http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html, and ended up with PHP5.3 installed.

    In answer to this question here, Amazon Linux Version Details, ceejay0z explains that I can upgrade to PHP5.5 using yum install php55. When I do, however, I get errors relating to conflicts (at the end of dependency checking).

    So, my question is, how do I proceed from here? Do I want to erase the existing PHP install, then install the new one? Upgrade? Update? Update-to? (In case it's not obvious, I have not used yum before...)

    • Drew Khoury
      Drew Khoury over 10 years
      you should list your errors so that people can help
    • Pochi
      Pochi over 10 years
      how did you get this working?
    • DatsunBing
      DatsunBing over 10 years
      Chiquis, see answer below. That's as far as I got. The next problem I struck was that the PDO driver for MySQL was not in the repo, (not for 5.5 anyhow). I trashed the machine and went to Ubuntu 12.04. Happy days.
  • Drew Khoury
    Drew Khoury over 10 years
    You shouldn't post edits to your question as answers.
  • Mark Kasson
    Mark Kasson about 10 years
    I get "No package php55-mysql available."
  • Benubird
    Benubird about 10 years
    @MarkKasson Try php55-mysqlnd or php-mysqlnd. I think I might have been suppressing errors when I ran that, sorry
  • Mark Kasson
    Mark Kasson about 10 years
    My particular need solved with sudo yum install php-mysqli -y. I recall seeing that it loaded php-mysqlnd.
  • Ashish Karpe
    Ashish Karpe almost 8 years
    Can I do this with #yum upgrade php5.6 ? will this upgrade php5.3 to php5.6 without dependencies issues ? or removing 5.3 in installing 5.6 is the only better way