brew install php55-intl fails, Cant Install Composer - php

I'm trying to install npm install && grunt, however it tells me that I need composer. I'm trying to install composer but that's dependent on php55.
I've tried brew install php55, php55-intl, php56, php56-intl, etc.
I am reading the instructions from here: https://getcomposer.org/doc/00-intro.md
It states that for a Mac I should simply use brew commands:
brew update brew tap
homebrew/homebrew-php
brew tap homebrew/dupes
brew tap homebrew/versions
brew install php55-intl #fails here
brew install homebrew/php/composer
I am getting the following error:
brew install php55-intl
==> Installing dependencies for php55-intl: php55, icu4c
==> Installing php55-intl dependency: php55
==> Downloading http://www.php.net/get/php-5.5.15.tar.bz2/from/this/mirror Already
downloaded: /Library/Caches/Homebrew/php55-5.5.15
==> ./configure --prefix=/usr/local/Cellar/php55/5.5.15 --localstatedir=/usr/local/var --sysconfdir=/usr/local/etc/php/5.5 --with-config-file-path=/usr/local/etc/php/5.5 --with-config-file-scan-dir=/usr/local/etc/php/5.5/conf.d -- checking for png_write_image in -lpng... yes If configure fails try
--with-xpm-dir= checking for fabsf... yes checking for floorf... yes configure: error: GD build test failed. Please check the
config.log for details.
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/homebrew/homebrew-php/issues
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require': Class is not a module (TypeError) from
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require' from
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:390:in
<class:HTTP>' from
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:384:in
' from
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:25:in
<top (required)>' from
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require' from
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require' from
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/https.rb:21:in
' from
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require' from
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require' from /usr/local/Library/Homebrew/utils.rb:308:in open'
from /usr/local/Library/Homebrew/utils.rb:350:inissues_matching'
from /usr/local/Library/Homebrew/utils.rb:378:in issues_for_formula'
from /usr/local/Library/Homebrew/exceptions.rb:171:infetch_issues'
from /usr/local/Library/Homebrew/exceptions.rb:167:in issues' from
/usr/local/Library/Homebrew/exceptions.rb:207:indump' from
/usr/local/Library/brew.rb:158:in rescue in <main>' from
/usr/local/Library/brew.rb:66:in'
Does anyone know another work around? I've tried curl commands but they never run, and I can't run the exe on my mac.
Thanks!

Solution:
Upgrade to the latest version of XCode
Make sure you reinstall XCode CLT: xcode-select --install
Update your formulae: brew update
Remove zlib: brew rm zlib
Install / reinstall php55: brew install php55 (as zlib is a dependency, it will be reinstalled)
Followed by brew install composer
Found here: https://github.com/Homebrew/homebrew-php/issues/610
I needed to update my Xcode, and then everything ran.

Related

Homebrew: How install disabled package(php7.1)?

I try to install php7.1 (via command brew install php#7.1) for my work-project on my new macbook, but i got following message:
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
I can't reject using php7.1 because it requirement of my work.
How can I install php7.1 on MacOS?
Start by making sure brew is up-to-date:
brew update
Normal upgrade
brew upgrade PHP
Normal upgrade does not work in many macOS old Versions.
Upgrade with shivammathur/homebrew-php
brew tap shivammathur/php
brew install shivammathur/php/php#7.1
To switch between versions, use the following command:
brew link --overwrite --force php#7.1
Next steps
Check the current version by running php -v:
If you can then, Restart Nginx or Apache also:
refer Link

Error when install PHP with brew in OS Monterey

I got php is deleted in OS Monterey, so I try to install it via Homebrew
I already install Homebrew, update tap to shivammathur/php and use this command
brew install shivammathur/php/php#7.4
but I got this response code
fatal: Could not resolve HEAD to a revision
Warning: No available formula with the name "httpd" (dependency of shivammathur/php/php#7.4).
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
When I check brew version with brew --version I got this info
Homebrew 3.3.2
Homebrew/homebrew-core (no Git repository)
Homebrew/homebrew-cask (git revision 5c43c2133d; last commit 2021-11-06)
is that no Git repository issue related with why I cant install php in my device? How to solve this issue
I need this to install composer and install Laravel, so install XAMPP I think is not clear solution right now
Thankyou
I recently had this exact problem and tried
brew tap homebrew/core
However, it didn't work. This did work for me
rm -rf $(brew --repo homebrew/core)
brew tap homebrew/core
brew install php
Hope this helps!
As the output of brew --version says homebrew-core repository is missing, that is why brew is not able to find httpd.
Homebrew/homebrew-core (no Git repository)
Please tap the core repository and try again.
brew tap homebrew/core
Try write this in terminal:
git -C $(brew --repository homebrew/core) checkout master

Homebrew upgrade drops PHP: dyld: Library not loaded: /usr/local/opt/libpsl/lib/libpsl.5.dylib

Today I upgraded Homebrew and this causes PHP versions (7.2 - 7.3) to be dropped. the following error is shown whenever I try to reinstall them:
dyld: Library not loaded: /usr/local/opt/libpsl/lib/libpsl.5.dylib
Referenced from: /usr/local/opt/curl-openssl/bin/curl
Reason: image not found
Error: An exception occurred within a child process:
DownloadError: Failed to download resource "php"
Download failed: https://www.php.net/distributions/php-7.3.9.tar.xz
Any suggestions?
Okay, I've solved this by installing this library brew install libpsl
then reinstall php brew reinstall php#7.2 --build-from-source
also the same for php#7.3
Be aware that reinstalling php will reset all php configurations
It's a bug after php was migrated to OpenSSH 1.1. There's no need to install libpsl.
The problem has been fixed by pr-44048. You should uninstall libpsl and reinstall php.
brew uninstall libpsl
brew reinstall php
Removing the Cellar folder and installing the PHP again worked for me.
rm -rf /Users/rafaelgomes/.composer/*
rm -rf /usr/local/Cellar/*
brew doctor ; brew update ; brew upgrade
brew install php
I've solved this by doing the following
brew uninstall libpsl
brew remove php
brew install libpsl
brew install php#8.0

Cannot upgrade to PHP 7 on Sierra

I can't seem to upgrade to PHP 7 since upgrading OS X to Sierra. I've tried following various tutorials but this I can't seem to do it.
Mikes-MacBook-Pro:~ mike$ brew tap homebrew/versions
Updating Homebrew...
Mikes-MacBook-Pro:~ mike$ brew tap homebrew/homebrew-php
Updating Homebrew...
Mikes-MacBook-Pro:~ mike$ brew unlink php56
Unlinking /usr/local/Cellar/php56/5.6.29_5... 17 symlinks removed
Mikes-MacBook-Pro:~ mike$ brew install php70
Error: /usr/local/opt/php70 is not a valid keg
Can someone point out what is wrong?
Update...
In /usr/local/Cellar
Go to folder: /usr/local/opt/
Delete php70 folder.
Then run: brew install php70 or brew install php70 --with-httpd24

mcrypt after homebrew install

I'm attempting to put together a new laravel application and tried to run php artisan to get the list of commands and it says MCrypt extention required. I am running on OSX Mavericks and ran the mrypt installation from homebrew. So now I"m stuck trying to figure out what I need to do. I am trying to get it ready so I can start messing with Vagrant.
I did go through the commands here through terminal:
brew install libjpeg
brew install pcre
brew install libxml2
brew install mcrypt
So now I'm trying to figure out why its not letting me run other commands and needing mycrpt enabled even though I already installed it.
I did the suggestions below and still when I try and run php artisan it says mycrypt php extention required.
Any ideas?
Assuming php 5.5:
brew install php55-mcrypt
If it doesn't find it:
brew tap josegonzalez/php
brew install php55-mcrypt
If it complains about not having zlib:
brew tap homebrew/dupes
brew tap josegonzalez/php
brew install php55-mcrypt
If you're on a different version of php, just change the php55 to match (php 5.3? brew install php53-mcrypt)

Categories