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 官方给出的安装命令
M1 下安装 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-crossoverxz: 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 下安装 wine 过程】感谢看到这里,如果有帮助到你,点个赞吧~~~

    推荐阅读