You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

"arch -x86_64 brew install MinGW-w64" is not working (Terminal issue)

i would like to use visual studio code and for that i need to install MinGw compiler.

i have already installed Homebrew successfully but when i tap this command "arch -x86_64 brew install MinGW-w64"

i always get this error:


Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)!

To rerun under ARM use:

  arch -arm64 brew install ...

To install under x86_64, install Homebrew into /usr/local.

nourzakor@Nours-MacBook ~ % 


Homebrew was installed successfully:


the Error that i keep getting:

i have a macbook pro 14 m1pro, please help me fix this issue because i need to code!

Posted on Mar 17, 2022 2:04 AM

Reply
4 replies

Mar 20, 2022 12:51 PM in response to Nourzakor

Your M1 MacBook Pro 14" uses an ARM64 architecture. MinGW-w64 is compiled for Intel x86_64 architecture. It is not compatible.


The best you can do is to attempt to virtualize an ARM version of Windows on the M1 Mac. Parallels virtual machine or download the latest free VMware Fusion beta for Apple Silicon then join the Insiders Program at Microsoft for Windows and install Windows for ARM and that should allow you to run the full Visual Studio.


However, none of that is supported by Microsoft, they do not sell Windows for ARM which is intended only for Surface Tablets. Not everything works in the ARM based Windows and whatever you compile might not run on x86_64 architecture.


If your development workflow doesn't involve compiling Windows binaries, there are plenty of alternative development environments besides Microsoft Visual Studio. Otherwise, you might need a PC which you could remote connect to from the Mac using Microsoft Remote Desktop which is available in the Mac App Store.

Mar 20, 2022 1:12 PM in response to Nourzakor

There is the following:

https://visualstudio.microsoft.com


Visual Studio 17.1 for Windows

Visual Studio for Mac 8.10

Visual Studio Code 1.64 for Windows / Mac / Linux


I was assuming the jumping through hoops was an attempt to run the full blown Visual Studio for Windows which is not likely due to Apple Silicon Macs being ARM64. If he's looking to compile x86_64 Windows binaries, only Windows will do.

Mar 20, 2022 7:00 PM in response to Nourzakor

Not all Homebrew formulas designed for an Intel CPU will work with an M1 Mac even when using Rosetta. Homebrew at one time had a warning on their website that many Homebrew formulas will not work on an M1 Mac. Plus I believe the location of the Homebrew files have changed with either later versions of macOS and/or M1 Macs (meaning any formulas not converted to an M1 Mac may configured to the old location).


If you have a valid Windows license, then you can attempt to install the Intel version of Windows on the M1 Mac using the "UTM" app which is just a GUI wrapper for the free open source QEMU utility. QEMU is a machine virtualizer and emulator which has existed for many many years. You may find some things may not work correctly since QEMU emulates only the basic features of a general Intel PC.

https://mac.getutm.app/


It is not clear what kind of development you intend to pursue. It may help the other contributors to offer suggestions if they knew what platform(s) you plan to develop for. Unfortunately I won't be of any help as I am not a developer and have only a limited knowledge of macOS programming.

"arch -x86_64 brew install MinGW-w64" is not working (Terminal issue)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.