【问题标题】:Installing Wine on Mac OS Catalina. Error: No available formula with the name "wine"在 Mac OS Catalina 上安装 Wine。错误:没有名称为“wine”的可用公式
【发布时间】:2020-03-12 10:57:30
【问题描述】:

我正在尝试通过 Brew 在我的 Mac 上安装 Wine。我正在使用 Catalina,刚刚更新了 brew,安装了 XQuartz 并安装了 Xcode。当我输入命令“Brew install wine”时,它会返回以下内容:

Error: No available formula with the name "wine" 
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

wine was deleted from homebrew/core in commit 82bd38bc:
  wine: delete

To show the formula before removal run:
  git -C "$(brew --repo homebrew/core)" show 82bd38bc^:Formula/wine.rb

If you still use this formula consider creating your own tap:
  https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap

我正在关注本教程:https://www.davidbaumgold.com/tutorials/wine-mac/

当我运行 Brew doctor 时,我得到以下信息:

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and which additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
  /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7-config
  /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7m-config
  /Library/Frameworks/Python.framework/Versions/3.7/bin/python3-config

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libtcl8.6.dylib
  /usr/local/lib/libtk8.6.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/fakemysql.h
  /usr/local/include/fakepq.h
  /usr/local/include/fakesql.h
  /usr/local/include/itcl.h
  /usr/local/include/itcl2TclOO.h
  /usr/local/include/itclDecls.h
  /usr/local/include/itclInt.h
  /usr/local/include/itclIntDecls.h
  /usr/local/include/itclMigrate2TclCore.h
  /usr/local/include/itclTclIntStubsFcn.h
  /usr/local/include/mysqlStubs.h
  /usr/local/include/odbcStubs.h
  /usr/local/include/pqStubs.h
  /usr/local/include/tcl.h
  /usr/local/include/tclDecls.h
  /usr/local/include/tclOO.h
  /usr/local/include/tclOODecls.h
  /usr/local/include/tclPlatDecls.h
  /usr/local/include/tclThread.h
  /usr/local/include/tclTomMath.h
  /usr/local/include/tclTomMathDecls.h
  /usr/local/include/tdbc.h
  /usr/local/include/tdbcDecls.h
  /usr/local/include/tdbcInt.h
  /usr/local/include/tk.h
  /usr/local/include/tkDecls.h
  /usr/local/include/tkPlatDecls.h

Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
  /usr/local/lib/pkgconfig/tcl.pc
  /usr/local/lib/pkgconfig/tk.pc

Warning: Unbrewed static libraries were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected static libraries:
  /usr/local/lib/libtclstub8.6.a
  /usr/local/lib/libtkstub8.6.a

我不确定这些警告是否与它有关。

提前致谢!

【问题讨论】:

  • 这不是一个编程问题,除非你想自己解决这个问题。如果软件未构建,请改为在 Mac 论坛中搜索答案或提交错误报告。

标签: homebrew formula wine macos-catalina


【解决方案1】:

由于与 Macos Catalina 不兼容,Wine 已从自制软件中删除

https://discourse.brew.sh/t/issue-with-wine/6188/3

【讨论】:

  • 如何在旧版本的 osx 上安装
【解决方案2】:

我能够在 macOS Catalina 上从源代码构建 Wine 64 位,并在其上成功运行 Notepad++ 64 位。

我的步骤或多或少是这样的:

  1. https://dl.winehq.org/wine/source/4.x/wine-4.20.tar.xz下载Wine 4.20
  2. 解压
  3. 在终端中转到提取的目录
  4. 运行:./configure --enable-win64
  5. 它显示它找不到某个库(我不记得到底是什么)所以我用 macports 安装了它(sudo port install name_of_missing_package 由 ./configure 报告)
  6. 在我能够成功运行 ./configure --enable-win64 且终端运行没有错误后:make
  7. 30 多分钟后编译完成。
  8. 我运行它:./wine start
  9. 它打开了 Windows 控制台,在这里我可以 cd 到 Notepad++ 64 位目录(从 https://notepad-plus-plus.org/repository/7.x/7.0/npp.7.bin.x64.zip 下载,请注意最新版本无法正常工作,并引发了一些关于某些 dll 的错误)
  10. 我输入了notepad++来运行exe文件
  11. 它显示了一些关于 freetype 字体的错误,所以我用 macports 安装它们,我必须在 wine 检测到它们之前将它们从 /opt/X11/lib 复制到 /usr/local/lib
  12. 修复 freetype 字体问题后,我可以运行 notepad++
  13. 如果您会看到一些关于加载来自未知开发人员的应用程序的系统警报,您可能还需要运行:sudo spctl --master-disable 以禁用网守。
  14. 另请注意,您可以运行 ./wine explorer 来代替控制台,而不是 ./wine start 来运行图形文件管理器

这些步骤可能并不完全准确,因为我不确定我是否没有遗漏某些东西,但希望它会对某人有所帮助。

另外请注意,显然 macOS Catalina 上的 wine 将只能运行一些 64 位 Windows 应用程序,而所有 32 位 Windows 应用程序将无法运行。我还使用 IrfanView 64 位 (https://www.fosshub.com/IrfanView.html?dwl=iview453_x64_setup.exe) 对其进行了测试,它也可以正常工作。

如果您想让 wine 运行以运行 32 位游戏,那么不幸的是它不适用于 wine,但您可以尝试使用 virtualbox。您可以查看https://www.youtube.com/watch?v=3AO8dF0vviQ 了解一些性能改进提示。

【讨论】:

  • 所以你不需要像 OpenSSL 这样的依赖库?
  • cmets 中还有更多内容at Ask Different
【解决方案3】:

基于https://github.com/Homebrew/homebrew-core/pull/46556#issuecomment-559938873,您可以在较新版本的 OS X 上执行brew cask install wine-stable。并且可以与最新版本的自制软件一起使用,因为源版本已被移动:(

【讨论】:

  • 对我不起作用(macOS Catalina 10.15.2)。启动wine 的错误是bad CPU type in executable: wine
【解决方案4】:

从 Wine 5.0 开始,正式版的 mac 不支持 32bit,但是可以通过以下方式实现

非官方 Wineskin 酒厂

您可以从 github 发布版here 下载它。然后用 WS11WineCX[64/32]bit19.0.[0/1] 创建一个 Wineskin。所有 WS11 版本都支持 Catalina。要使用它,您还需要关闭 no32exec 引导参数。理论上你可以通过输入:

sudo nvram boot-args="no32exec=0"

在您登录时进入终端,但它对我没有用,所以如果您遇到同样的问题,请重新启动进入恢复模式,在菜单栏中选择实用程序 -> 终端并输入:

nvram boot-args="no32exec=0"

(没有 sudo)。

示例

更准确地说,安装例如。 Steam 32 位,你会:

  1. 安装Unofficiall Wineskin Winery from the provided link

  2. 通过进入恢复模式并在终端中输入nvram boot-args="no32exec=0" 来打开 32 位执行引导参数

  3. 打开 Wineskin,单击“+”号并向下滚动以找到 WS11WineCX64bit19.0.1(在撰写本文时支持 64 位和 32 位的最新版本)

  4. 点击 Wrapper Version 下的 update/install。

  5. 点击 Create New Blank Wrapper,命名并点击安装 mono 和 gecko。

  6. 从 Finder 启动 Wrapper 应用程序。单击安装软件,选择安装可执行文件,然后继续安装。然后从菜单中选择可执行文件。 (如果是 Steam,Steam.exe)

注意:如果您收到“没有 Windows 应用程序打开文件”(就像我一样)错误,请单击高级 -> 配置并将 Windows EXE 设置为安装程序的路径。然后找到它的安装位置并将其设置为Windows EXE。然后就可以通过点击Test Run来运行了。

  1. 以 .app 文件形式享受您的 Windows 应用程序!

希望我能帮上忙!

【讨论】:

    【解决方案5】:

    如何在 Mac OS Catalina 上使用 brew 安装 wine

    • 安装自制软件
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
    
    • 安装 xquartz 以使用 brew 安装 wine
     brew cask install xquartz
    
    • 使用 brew 安装 wine
    brew install homebrew/cask-versions/wine-devel
    
    • 运行 wine 并检查版本
    wine64 --version
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-11-23
      • 2017-11-02
      • 2021-03-02
      • 2022-11-25
      • 2014-04-06
      • 2020-02-28
      • 2021-06-23
      • 1970-01-01
      相关资源
      最近更新 更多