在Mac OS Catalina上安装Wine。错误:名称为“葡萄酒”的无可用公式

时间:2019-11-16 13:51:54

标签: homebrew formula wine macos-catalina

我正在尝试通过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医生时,我得到以下信息:

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

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

谢谢!

6 个答案:

答案 0 :(得分: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安装了它(由./configure报告的sudo端口安装name_of_missing_package)
  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启动,您可以为图形文件管理器而不是控制台运行./wine Explorer。

这些步骤可能并不十分精确,因为我不确定我是否没有错过任何事情,但希望它能对某人有所帮助。

还请注意,显然,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了解一些性能改进技巧。

答案 1 :(得分:1)

由于与Macos Catalina不兼容,葡萄酒尚未从自制酒中移除

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

答案 2 :(得分:0)

我无法在MacOS Catalina(10.15.1)上构建Wine 4.2。 :(

我成功达到了./configure --enable-win64。运行“ make”命令后不久,我收到了2条警告和6条错误通知:

config.c:147:5: error: use of undeclared identifier 'Dl_info'
    Dl_info info;
    ^
config.c:150:9: warning: implicit declaration of function 'dladdr' is invalid in
      C99 [-Wimplicit-function-declaration]
    if (dladdr( get_runtime_libdir, &info ) && info.dli_fname[0] == '/')
        ^
config.c:150:9: warning: this function declaration is not a prototype
      [-Wstrict-prototypes]
config.c:150:38: error: use of undeclared identifier 'info'; did you mean
      'sinf'?
    if (dladdr( get_runtime_libdir, &info ) && info.dli_fname[0] == '/')
                                     ^~~~
                                     sinf
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/math.h:328:14: note: 
      'sinf' declared here
extern float sinf(float);
             ^
config.c:150:48: error: use of undeclared identifier 'info'
    if (dladdr( get_runtime_libdir, &info ) && info.dli_fname[0] == '/')
                                               ^
config.c:152:34: error: use of undeclared identifier 'info'
        const char *p = strrchr( info.dli_fname, '/' );
                                 ^
config.c:153:32: error: use of undeclared identifier 'info'
        unsigned int len = p - info.dli_fname;
                               ^
config.c:156:25: error: use of undeclared identifier 'info'
        memcpy( libdir, info.dli_fname, len );

也许Catalina会比Wine 4.22更友好。 (叹气)

答案 3 :(得分:0)

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

答案 4 :(得分:0)

从Wine 5.0开始,在正式版本中Mac上没有32位支持,但是您可以通过

实现

非官方的酒皮酒庄

您可以从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 32bit,您将:

  1. 安装Unofficiall Wineskin Winery from the provided link

  2. 进入“恢复模式”并在终端中输入nvram boot-args="no32exec=0",打开32位执行启动参数

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

  4. 在包装器版本下单击更新/安装。

  5. 单击“创建新的空白包装纸”,将其命名,然后单击安装mono和gecko。

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

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

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

希望我能帮上忙!

答案 5 :(得分:0)

如何在带有brew的Mac OS Catalina上安装酒

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