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
Related
I have a Mac Air with Ventura OS.
I just installed Brew and after that I can't upgrade PHP anymore.
I get the following error:
Error: php#7.4 has been disabled because it is a versioned formula!
How can I solve it?
New to MacOS and Brew.
Thanks
Fabio
No clue what to do at this point.
The message tells you that PHP 7.4 is outdated. You can either install PHP8
brew install php
or link a 3rd party repository and install 7.4 from there.
For example:
brew tap shivammathur/php
brew install shivammathur/php/php#7.4
brew link php#7.4
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
I'm trying to install php72 using brew.
Actually when I do brew install php72 it's downloading "https://homebrew.bintray.com/bottles/php-7.3.0.mojave.bottle.tar.gz".
So when I check php version it's showing me PHP 7.3.0 (cli).
How can I install exactly php72 and not php73 ?
I found the solution.
Instead of installing php72 you must specify version like this php#7.2.
brew unlink [your actual php version linked]
brew install php#7.2
brew link php#7.2
Installing PHP 7.2 on Mac using Homebrew
Check version
php -v
check brew is up to date
brew update
brew upgrade
Unlink php version which is installed in the system
brew unlink php71
Now final step to download**
brew install php72
export PATH=/usr/local/php5/bin:$PATH
This worked for me
brew upgrade
brew unlink php71
brew install php72
then in your ~/.bash_profile
export PATH=/usr/local/Cellar/php\#7.2/7.2.26/bin/:$PATH
brew tap homebrew/homebrew-php
brew unlink php71
brew install php72 --with-argon2
brew install php72-xdebug
For more info follow url https://murze.be/how-to-upgrade-from-php-71-to-72-on-macos-using-homebrew
Note older version's of Mac OS are not supported, I'm trying with docker which also doesn't support older versions of Mac OS completely (no desktop version). Trying with just docker machine as follows;
base=https://github.com/docker/machine/releases/download/v0.16.0 &&
curl -L $base/docker-machine-$(uname -s)-$(uname -m) >/usr/local/bin/docker-machine &&
chmod +x /usr/local/bin/docker-machine
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)
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.