0

I have been wrecking my head over this, since a week now.

I am on Mac catalina.

I have installed PHP 7.3 using brew.

$php -v
PHP 7.3.11 (cli) (built: Feb 29 2020 02:50:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.11, Copyright (c) 1998-2018 Zend Technologies
$echo $PATH
/Users/talvinder/Projects/pipal.com/trellis/.trellis/virtualenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin
$find /usr -name php
/usr/bin/php
find: /usr/sbin/authserver: Permission denied
/usr/local/bin/php
/usr/local/etc/php
/usr/local/Cellar/php@7.3/7.3.19/bin/php
/usr/local/Cellar/php@7.3/7.3.19/include/php
/usr/local/Cellar/php@7.3/7.3.19/lib/php
/usr/local/Cellar/php@7.3/7.3.19/.bottle/etc/php
/usr/local/Cellar/php@7.3/7.3.19/share/php
/usr/lib/php
/usr/share/php
/usr/share/php/php

I am using zsh as terminal. Still, time and again, I get "Bad CPU in executable" issue.

Case in context, I am trying to install the sage theme from roots/trellis

$php composer.phar create-project roots/sage site/web/app/themes/sage
... a lot of installation goes well
... ends with
Generating autoload files
> Roots\Sage\Installer\ComposerScript::postCreateProject
sh: /usr/local/bin/php: Bad CPU type in executable
sh: /usr/local/bin/php: Bad CPU type in executable
sh: /usr/local/bin/php: Bad CPU type in executable

Can anyone please guide me here?

rednivlat
  • 135
  • 2
  • 2
  • 11
  • 1
    are you sure you are using `zsh` ? What is the output of `echo "My shell: $SHELL"` What does `which php` show? Also what is the output of `file /usr/local/bin/php` ? – Ron Jul 06 '20 at 16:59
  • Thanks for replying @Ron ` echo "My shell: $SHELL" My shell: /bin/zsh ` ` $ which php /usr/local/bin/php ` ` $ vi /usr/local/bin/php Îúíþ^G^@^@^@^C^@^@^@^B^@^@^@^S^@^@^@¤^G^@^@<85>^@^@^@^A^@^@^@8^@^@^@__PAGEZERO^@^@^@^@^@^@^@^@^@^@^@^P^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^A^@^@^@Ð^A^@^@__TEXT^@^@^@^@^@^@^@^@^@^@^@^P^@^@^@ t^@^@^@^@^@^@ t^@^G^@^@^@^E^@^@^@^F^@^@^@^@^@^@^@__text^@^@^@^@^@^@^@^@^@^@__TEXT^@^@^@^@^@^@^@^@^@^@<80>%^@^@j¤2^@<80>^U^@^@^D^@ ... a lot of similar garbage ` I guess the issue is with the file or its encoding? – rednivlat Jul 06 '20 at 17:31
  • 1
    so `which php` does not produce a result? also do not do `vi /usr/local/bin/php` which tries to edit a compiled file, but execute `file /usr/local/bin/php`, which will return 1 line. – Ron Jul 06 '20 at 18:20

0 Answers0