32

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
Spiff
  • 110,156

4 Answers4

62

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.

jvb
  • 3,196
2

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

sonatique
  • 121
1

Been having the same issue, for 13.4.1 Ventura.

The answer from Иван Балдин should have worked but they added a second line.

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

Comment out these 2 lines and winecfg should work.

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