Zaen Khilji
Zaen Khilji

Reputation: 55

Can't install phalcon php on Apple M1 Pro

I've been trying to install Phalcon 3.4 on my xampp PHP 7.3 setup (Macbook Pro 16 M1 Pro chip). Following I've tried:

zaenkhilji@Zaens-MacBook-Pro ~ % brew tap phalcon/extension https://github.com/phalcon/homebrew-tap
brew install phalcon

==> Tapping phalcon/extension
Cloning into '/opt/homebrew/Library/Taps/phalcon/homebrew-extension'...
remote: Enumerating objects: 369, done.
remote: Counting objects: 100% (215/215), done.
remote: Compressing objects: 100% (118/118), done.
remote: Total 369 (delta 140), reused 122 (delta 83), pack-reused 154
Receiving objects: 100% (369/369), 65.43 KiB | 1.26 MiB/s, done.
Resolving deltas: 100% (224/224), done.
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x000000012705d6b0>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
psr@74: undefined method `cellar' for #<BottleSpecification:0x0000000127135b28>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x00000001261297e8>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x0000000126253060>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x0000000126291568>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x00000001262ca020>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x000000012724f900>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x000000012728c6c0>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/phalcon@73_4.0.0.rb
phalcon@73_4.0.0: undefined method `cellar' for #<BottleSpecification:0x00000001272c47a0>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x00000001262e7aa8>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x00000001262fe208>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
psr@73: undefined method `cellar' for #<BottleSpecification:0x00000001263155e8>
Error: Invalid formula: /opt/homebrew/Library/Taps/phalcon/homebrew-extension/Formula/[email protected]
[email protected]: undefined method `cellar' for #<BottleSpecification:0x000000012632c888>
Error: Cannot tap phalcon/extension: invalid syntax in tap!
Warning: No available formula or cask with the name "phalcon". Did you mean falcon?
==> Searching for similarly named formulae...
This similarly named formula was found:
falcon
To install it, run:
  brew install falcon
==> 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.

What are the remaining options? Or is there no support for arm-based devices?

Upvotes: 1

Views: 1564

Answers (3)

Brade
Brade

Reputation: 1531

You'll probably need to go the Docker route: https://github.com/MilesChou/docker-phalcon

I've done this on a M1 Pro and it works.

Might be able to use https://www.vagrantup.com/ as well, but I haven't tried that on M1. It's worked well in the past though.

Upvotes: 0

Zaen Khilji
Zaen Khilji

Reputation: 55

As of now Phalcon < 3.* is not supported by the the arm64-based chips. Phalcon > 4.* is supporting arm64-based chips.

My solution to the problem was to deploy a docker ubuntu image and run the project until we don't upgrade to newer version of Phalcon. This is working fine after almost 30h+ in already.

Upvotes: 0

emptyhua
emptyhua

Reputation: 6692

The error message (have 'arm64', need 'x86_64') indicates that xampp is a x86_64 app, but php73-phalcon3 installed from macport is of arm64. You could try to download x86 version of php73-phalcon3. uncompress and copy phalcon.so to your xampp extension directory.

Upvotes: 0

Related Questions