19

My wine met some problems while executing Windows executable file:

$ wine GECacheBldr.exe
zsh: bad CPU type in executable: wine

How to fix this?

PS: My wine is installed using HomeBrew:

$ brew cask install wine-stable

EDIT

Cannot execute winecfg either:

$ winecfg
/usr/local/bin/winecfg: line 46: /usr/local/bin/wine: Bad CPU type in executable
/usr/local/bin/winecfg: line 46: /usr/local/bin/wine: Undefined error: 0
2

3 Answers 3

45

Try

file `which wine`

If it says something in the lines of Mach-O executable i386: Apple dropped support for 32bit executables with Catalina 10.15.

You might want to try wine64 instead of wine.

6
  • How to run a 32-bit Windows executable file? Or I can never use them?
    – xiaoyu2006
    Feb 6, 2020 at 12:06
  • 2
    Alas, not with wine on Catalina 10.15 any more. You could use a virtual machine (like VirtualBox - it's free), but then you would need a Windows license, and have to install Windows inside the VM.
    – jvb
    Feb 6, 2020 at 12:42
  • 1
    I don't think this accepted solution actually solves the problem.
    – Dr_Zaszuś
    Apr 3, 2020 at 18:47
  • 3
    @Dr_Zaszuś there is no solution insofar one cannot use 32bit software on MacOS Catalina. Either use 64bit wine or downgrade MacOS, or try a different approach (like VirtualBox), see above.
    – jvb
    Apr 3, 2020 at 19:31
  • Is there a reason that the Wine devs don't just make the wine command launch 64-bit Wine? Mar 11 at 6:07
0

try to edit winecfg file, comment this line

if [ -x "$appdir/wine" ]; then exec "$appdir/wine" "$appname" "$@"; fi

it should look like that

#if [ -x "$appdir/wine" ]; then exec "$appdir/wine" "$appname" "$@"; fi
1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Jan 27 at 2:51
0

I did

rm /usr/local/bin/wine

then

ln -s /usr/local/bin/wine64 /usr/local/bin/wine

because "wine" is the 32bit version which is tried first by all scripts and apparently OS X does not provide a compatibility layer for 32bit.

It basically works but so far I wasn't able to do everything I need, I still got errors when executing some wine related commands.

Another options I tried with more success in prepending WINE=/usr/local/bin/wine64 before every wine related commands I want to run, including winetricks

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Apr 28 at 10:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.