Laravel requires php56-mcrypt, but I can't install php56-mcrypt - php

I'm trying to get an old Laravel project running, but when I try running composer install, I get this error:
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for laravel/framework v5.0.32 -> satisfiable by laravel/framework[v5.0.32].
- laravel/framework v5.0.32 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
Problem 2
- laravel/framework v5.0.32 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- barryvdh/laravel-ide-helper v2.0.3 requires illuminate/console 5.0.x -> satisfiable by laravel/framework[v5.0.32].
- Installation request for barryvdh/laravel-ide-helper v2.0.3 -> satisfiable by barryvdh/laravel-ide-helper[v2.0.3].
The php executable I'm using is located here:
/usr/local/Cellar/php#5.6/5.6.30_6/bin/php
And I've added extension=mcrypt.so to every php.ini I could find (including one I put at the root of the Laravel project).
I have no idea if this is related (there appears to be a dozen or more php versions scattered throughout my Mac).
So I've been trying to install mcrypt but every answer I've found seems to be outdated. This is what I've tried:
brew install homebrew/php/php56-mcrypt
Output: Error: No available formula with the name "homebrew/php/php56-mcrypt"
brew install php#5.6 -with-mcrypt=mcrypt
This seems to install successfully but doesn't fix the error.
brew update
brew upgrade
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install php56-mcrypt
Output: Error: No available formula with the name "php56-mcrypt"
How am I supposed to install php56-mcrypt on a Mac?

Try with this:- brew install php56-mcrypt --without-homebrew-php
And add this extension in your /private/etc/php.ini :-
extension="/usr/local/Cellar/php56-mcrypt/5.6.x/mcrypt.so"
Edit:- Try adding tap first as follows:- brew tap homebrew/homebrew-php and than run the install command.

Related

Hosting laravel 5.6 on VPS?

hi guys am trying to host a laravel 5.6 app on a VPS for the first time and i cant seem to get it right..am using LEMP.i followed some guide which was using php 7.0 but my project requires php 7.1 "i think i managed to resolve the error using the following line"
sudo apt-get install php7.1-cli php7.1-fpm php7.1-mbstring php7.1-mysql
php7.1-mcrypt php7.1-curl
now am getting the following error
Problem 1
- Installation request for phpoffice/phpexcel 1.8.1 -> satisfiable by
phpoffice/phpexcel[1.8.1].
- phpoffice/phpexcel 1.8.1 requires ext-xml * -> the requested PHP extension
xml is missing from your system.
Problem 2
- phpoffice/phpexcel 1.8.1 requires ext-xml * -> the requested PHP extension
xml is missing from your system.
- maatwebsite/excel 2.1.28 requires phpoffice/phpexcel ^1.8.1 -> satisfiable
by phpoffice/phpexcel[1.8.1].
- Installation request for maatwebsite/excel 2.1.28 -> satisfiable by
maatwebsite/excel[2.1.28].
this is my first time so any useful information is very welcome :)
You would need to install the php-xml package. You can do it using the following command:
sudo apt-get install php-xml
When the package is installed run the composer install again.
You can read more about this issue here: https://laracasts.com/discuss/channels/servers/how-do-i-install-the-dom-extension-for-php7
edit:
if it does not install the correct version of the package, you can use the command from #Dharma Saputra's comment:
sudo apt-get install php7.1-xml

Composer installation requirements

I am trying to install composer to the laravel project.
When im doing sudo composer install in projects directory it shows me two errors:
Problem 1
- Installation request for simplesoftwareio/simple-qrcode dev-master -> satisfiable by simplesoftwareio/simple-qrcode[dev-master].
- simplesoftwareio/simple-qrcode dev-master requires ext-gd * -> the requested PHP extension gd is missing from your system.
Problem 2
- Installation request for esendex/sdk ^1.3 -> satisfiable by esendex/sdk[v1.3.0].
- esendex/sdk v1.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
I was checking how to install it and I found these commands:
composer require simplesoftwareio/simple-qrcode
composer require esendex/sdk
Anyway, they are giving me the same error. Is there anything I can do about it?
Looks like you have some PHP modules missing.
For PHP5
sudo apt-get install php5-curl
sudo apt-get install php5-gd
For PHP7
sudo apt-get install php7-curl
sudo apt-get install php7-gd
Packages may be different depending on your OS
Is there anything I can do about it?
Yes. You can install the two PHP modules that Composer tells you are required:
simplesoftwareio/simple-qrcode dev-master requires ext-gd * -> the requested PHP extension gd is missing from your system.
esendex/sdk v1.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Exactly how you do that will depend on your operating system.
Ubuntu 16.10, for example, offers php-gd and php-curl system packages.

Unable to install laravel 5 on windows via composer

I am trying to get started with laravel on windows and here is the command I tried:
rahul#rahulserver MINGW64 /d/PhpIdeaProjects/LaravelLearning
$ composer create-project laravel/laravel learning-laravel-5
Here is the output I get:
Installing laravel/laravel (v5.0.22)
- Installing laravel/laravel (v5.0.22)
Loading from cache
Created project in learning-laravel-5
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for danielstjules/stringy 1.9.0 -> satisfiable by danielstjules/stringy[1.9.0].
- danielstjules/stringy 1.9.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 2
- Installation request for laravel/framework v5.0.16 -> satisfiable by laravel/framework[v5.0.16].
- laravel/framework v5.0.16 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
So how shall I move on and have it working?
The requested dependencies require the php extension mbstring as the error explains.
the requested PHP extension mbstring is missing from your system
So install the extension and it should install flawless.
mbstring is built in the libapache2-mod-php5 package. Run
sudo apt-get install libapache2-mod-php5
For windows environments check your php.ini and uncomment the line ;extension=php_mbstring.dll to extension=php_mbstring.dll - then restart your webserver.

MCrypt is missing from your system. OS Yosemite

So at work, I've been tasked to learn and start to use some Laravel, so I've been following the documentation and some tutorials on Youtube, but I cannot seem to get it working. I am using composer and MAMP to install Laravel. When I use the command (in the terminal) "composer create-project laravel/laravel TestLaravel" while in htdocs. It quickly comes up with this error:
➜ htdocs composer create-project laravel/laravel TestLaravel
Installing laravel/laravel (v5.0.1)
- Installing laravel/laravel (v5.0.1)
Loading from cache
Created project in TestLaravel
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework v5.0.5 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.4 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.3 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.2 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.1 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.0 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- Installation request for laravel/framework 5.0.* -> satisfiable by laravel/framework[v5.0.0, v5.0.1, v5.0.2, v5.0.3, v5.0.4, v5.0.5].
I was wondering if anyone would have a solution to this problem for me.
Thank you.
Joshua Johnson
Mac OS X Yosemite
the requested PHP extension mcrypt is missing from your system
I fixed this error by running the following commands in my Terminal :
brew update
brew upgrade
brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew install php54-mcrypt
Mostly this problem comes when your MAMP PHP Version not match with command version php. Please have a look in terminal by type php -v then it will show version like php 5.5.*
The problem is you have to set your MAMP PHP Path in ~/.bash_profile like this :
sudo nano ~/.bash_profile
PATH="/Applications/MAMP/bin/php/php5.6.7/bin:$PATH"
That's all, or install mcrypt lib if you want to use your default system php.
The way that I got around this was to install Homestead and make sure to log in to the Homestead Virtual Machine before running any commands. MCrypt is not installed on your local machine, but it is in Homestead.
There's a PHP extension named mcrypt that's often not distributed with stock PHP packages. The mcrypt extension is the defacto standard PHP extension for encryption and hashing functionality. Laravel uses mcrypt.
The built in PHP on OS X does not come with mcrypt installed. This means you either need to
Build and install the mcrypt extension yourself for OS X's built in PHP
Use homebrew to build and install PHP with mycrypt
Use a "pre-compiled for OS X" PHP package.
Use a vagrant virtual machine to run your development stack
I usually chose the third option, and use the lipp.ch package. This is a long running project, and has it's roots in the old entropy.ch packages managed by Marc Liyanage from even further back.

ext-mcrypt error while installing laravel on ubuntu 14.04

I am beginner in laravel in ubuntu 14.04.
I try to run this following commend for install laravel.
composer create-project laravel/laravel --prefer-dist
and i got following error.
i am also try to install ncrypt but i got same error.
Installing laravel/laravel (v5.0.1)
- Installing laravel/laravel (v5.0.1)
Loading from cache
Created project in /opt/lampp/htdocs/laravel
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework v5.0.2 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.1 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- laravel/framework v5.0.0 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- Installation request for laravel/framework 5.0.* -> satisfiable by laravel/framework[v5.0.0, v5.0.1, v5.0.2].
i am also try to run this command but i got this same error.
sudo apt-get install mcrypt php5-mcrypt
sudo php5enmod mcrypt
sudo service apache2 restart
Thanks in advance..
I am open this file
gedit /etc/php5/cli/php.ini
put one line in to this file
extension=mcrypt.so
and this run successfully.
any ways thanks again.
This is how I solved on Mac Yosemite. I have one php.ini in /etc/, and I have mcrypt instaIled. But I faced the same problem.
Run this to find another php.ini.
php -i|grep ini
It returned the followings.
System => Darwin Myname-MacBook-Pro.local 14.1.0 Darwin Kernel Version 14.1.0: Mon Dec 22 23:10:38 PST 2014; root:xnu-2782.10.72~2/RELEASE_X86_64 x86_64
Configuration File (php.ini) Path => /usr/local/etc/php/5.5
Loaded Configuration File => /usr/local/etc/php/5.5/php.ini
....
I open /usr/local/etc/php/5.5/php.ini and added extension=mcrypt.so to the file.
I hope this will help someone in future.
Mac users with brew just run in CLI:
brew install php56-mcrypt
Doinion Rings.

Categories