0

I'm installing laravel framework on my Amazon Linux Server, But once i compose and Laravel finish installing, laravel ask for Mcrypt PHP extension. then when i try to use command line to install Mcrypt (sudo yum install php-mcrypt) i get an error like below.

Error:

Error: php55-common conflicts with php-common-5.3.29-1.7.amzn1.x86_64 

Process i take to fix the issue:

  1. Reinstall PHP 5.5 - Failed
  2. Check to see if extension already exist and just uncomment it. - Failed
  3. sudo yum install php-amazon-sdk2 - Failed

I really appreciate everyone help, and thanks in advance. :)

  • maybe install from source so you can configure php with mcrypt – user16081-JoeT Dec 11 '14 at 06:10
  • @user16081-JoeT you mean entire PHP5.5 or just Mcrypt? – Farhad Nežad Dec 11 '14 at 06:11
  • i meant entire php, if you install from source you can use the configure option `--with-mcrypt` but you might just need to do `sudo apt-get install libmcrypt-dev` – user16081-JoeT Dec 11 '14 at 06:20
  • Can you refer me to a page where i can process a clean reinstall of PHP55 on Amazon Linux? @user16081-JoeT, – Farhad Nežad Dec 11 '14 at 06:30
  • oh it's Amazon linux, my bad i was thinking ubuntu; try `sudo yum install libmcrypt-devel` as far as a page specifically for Amazon, sorry i don't know where. – user16081-JoeT Dec 11 '14 at 06:32
  • @user16081-JoeT I get it to download Successfully, What page i should exactly look for? – Farhad Nežad Dec 11 '14 at 06:38
  • not sure - you could try reinstalling php with yum after installing libmcrypt-devel and maybe it will pick it up. If you want to install php from source, you should first remove it with yum, then i guess read the install docs on php.net – user16081-JoeT Dec 11 '14 at 06:45
  • @user16081-JoeT Alright Man Thanks for your Help. – Farhad Nežad Dec 11 '14 at 06:48
  • If I'm reading the error correctly, the extension you're trying to install is built for php55. Your system already has php53 installed (php-common-5.3...). You need to make a decision. Do you want php55 or php53? If you want 5.5, uninstall the 5.3 you already have. There may be other things that depend on 5.3 that would be removed with that, so you need to look carefully if you go that route. –  Dec 11 '14 at 07:09
  • If you want to stick with the 5.3 you already have installed, then throw away the one you're trying to install and find one built for 5.3. If Amazon is close enough to RHEL / CentOS you can probably use the one from [EPEL](http://dl.fedoraproject.org/pub/epel/6/x86_64/). –  Dec 11 '14 at 07:09
  • @yoonix Amazon Linux has diverged too far to be sure of compatibility; indeed, we have many questions right here on [sf] where the answer was that EPEL and similar packages simply aren't compatible with Amazon Linux. Given that it has an ongoing and troubling history of quality control problems, I'm quite surprised anyone at all uses it. – Michael Hampton Dec 11 '14 at 08:28
  • @yoonix I want to have php 5.5 with Mcrypt PHP extension, When i check for `php -v` i get result of `PHP 5.5.19 (cli) (built: Nov 21 2014 23:08:55)`, so basically saying PHP 5.3 is still installed on the Machine? if so, how you remove it? – Farhad Nežad Dec 11 '14 at 14:59
  • Remove the installed packages for 5.3 then. This isn't rocket science. –  Dec 11 '14 at 19:17
  • @yoonix Thanks, I solve the issue. it wasn't the PHP version, you had to use Amazon SDK update as well. – Farhad Nežad Dec 11 '14 at 19:21
  • 1
    Good to know! I'd write up an answer below in case anyone else runs into the same issue. –  Dec 11 '14 at 19:35

0 Answers0