0

Due the fact that Oracle has not released an ARM version (Apple Silicon) of their Instant Client (OCI8) I am forced to use the Intel version of MAMP with my MacBook Air (M2; 2023) so I can properly compile the OCI8 binary (based on the Intel version of the Instant Client) via Pecl.

Okay, that should be no big deal. MAMP basically runs Apache, MySQL and PHP so there should not be a performance hit. Rosetta translation of Intel code should not significant or negatively impact the use of MAMP at all.

But how I can I install the install the Intel version of the binary (MAMP_MAMP_PRO_6.9-Intel-x86.pkg) on my MacBook Air (M2; 2023)?

I launch the installer and get this message that effectively blocks and install:

x86_64 CPU required!

You need a x86 CPU (64 bit) to run MAMP or MAMP PRO.

enter image description here

I guess I could hassle a co-worker to install in on an Intel-based Mac and then just copy the MAMP folder located at /Applications/MAMP to a USB flash drive and then install that on my MacBook Air?

But is there any way to force the installer to ignore the CPU architecture mismatch so I can handle this on my own?

0

1 Answer 1

2

Yes you can!

You just have to hack/patch the Intel installer to ignore the architecture mismatch and the install will go ahead as normal.

The basis of this answer lies in the instructions that exist here in this other answer that is focused major macOS installers. The key is using pkgutil to expand the package, alter the Distribution script and then using pkgutil again to “flatten” the directory back into a package.

All steps assume you are working in the same directory as the MAMP_MAMP_PRO_6.9-Intel-x86.pkg package.

  1. Download the Intel binary installer package from the official MAMP site. Direct download link is here.
  2. Once downloaded, run this command to expand the package into a directory named MAMP_MAMP_PRO_6.9-Intel-x86:
    pkgutil --expand MAMP_MAMP_PRO_6.9-Intel-x86.pkg MAMP_MAMP_PRO_6.9-Intel-x86
    
  3. Go into that MAMP_MAMP_PRO_6.9-Intel-x86 directory and open up the Distribution script in whatever text editor that you like.
  4. Find the function installation_check() which lives around line 222. Remove, or comment out, lines 228 to 233 which read like this; that’s the stuff that triggers the architecture mismatch error message:
    if (tResult==false)
    {
        my.result.title = system.localizedString('REQUIREMENT_FAILED_MESSAGE_INSTALLATION_CHECK_1');
        my.result.message = system.localizedString('REQUIREMENT_FAILED_DESCRIPTION_INSTALLATION_CHECK_1');
        my.result.type = 'Fatal';
    }
    
  5. Save the file and exit your text editor.
  6. Trash the old MAMP_MAMP_PRO_6.9-Intel-x86.pkg file.
  7. Then run pkgutil with the flatten param to recompress the package installer like this:
    pkgutil --flatten MAMP_MAMP_PRO_6.9-Intel-x86 MAMP_MAMP_PRO_6.9-Intel-x86.pkg
    
  8. When that process completes you should now have a hacked/patched MAMP 6.9 Intel installer. Launch it and you should see this; just click Continue to install the Intel version of MAMP 6.9 on your Apple Silicon/ARM-based Mac: enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .