M1 下安装 wine 过程
解决
由于背景需要在mac下跨平台编译electron应用的windows版本,故开始找寻打包方法,踩坑记录。
先废话不多说,直接上完整command
# 卸载旧安装
brew uninstall --cask xquartz
brew uninstall --cask wine-stable
rm -rf ${HOME}/.wine_adoxx64
# 安装M1下的wine
brew tap gcenx/wine
brew install --cask --no-quarantine wine-crossover
# Output 最后一行
🍺 wine-crossover was successfully installed!
如果已经成功了,那恭喜你🍺,以下内容可以跳过了。
踩坑
1、 wine 官方给出的安装命令
运行失败,原因如下,页面都403了~~~还咋下载
Updating Homebrew... ==> Caveats wine-stable installs support for running 64 bit applications in Wine, which is considered experimental. If you do not want 64 bit support, you should download and install the wine-stable package manually. ==> Downloading https://dl.winehq.org/wine-builds/macosx/pool/winehq-stable-5.0.pkg ######################################################################## 100.0% ==> Installing dependencies: xquartz ==> Downloading https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.11.dmg -#O#- # # curl: (22) The requested URL returned error: 403 Forbidden Error: Download failed on Cask 'xquartz' with message: Download failed: https://dl.bintray.com/xquartz/downloads/XQuartz-2.7.11.dmg
2、运行到最后一行命令时出现如下报错
$>>> brew install --cask --no-quarantine wine-crossover xz: Calling `cellar` in a bottle block is disabled! Use `brew style --fix` on the formula to update the style or use `sha256` with a `cellar:` argument instead.
3、按照提示,执行brew style --fix依然无效,网上找寻半天,成功执行brew update-reset后再执行2即成功
感谢看到这里,如果有帮助到你,点个赞吧~~~
本文记录了在M1 Mac上安装wine的过程,包括遇到的问题及解决方案。首先,通过卸载旧版软件,然后从gcenx/wine源安装wine-crossover。在安装过程中可能遇到403错误、cellar警告等问题,解决方法包括执行brew update-reset等命令。最终成功安装wine。

被折叠的 条评论
为什么被折叠?



