php 如何在 Windows 中运行“brew”命令?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/44886348/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 03:03:13  来源:igfitidea点击:

How to run "brew" command in windows..?

phphtmlcodeigniterreactjscommand

提问by ArunValaven

It shows "'brew' is not recognized as an internal or external command" in windows command prompt.

它在 Windows 命令提示符中显示“ 'brew' 未被识别为内部或外部命令”。

enter image description here

在此处输入图片说明

I am trying to install codeigniter-reactjs-examplefrom github, where first command is brew. How to run this command to install that project in Windows..?

我正在尝试从github安装codeigniter-reactjs-example,其中第一个命令是. 如何运行此命令在 Windows 中安装该项目..?brew

回答by Vivek

Homebrew is MacOSX only command line installer application and it doesn't exist for Windows.

Homebrew 是仅适用于 MacOSX 的命令行安装程序应用程序,它在 Windows 中不存在。

The Windows alternatives are:

Windows 替代方案是:

  • Chocolatey
  • Npackd
  • Scoop
  • OneGet for Windows 10
  • 巧克力味
  • 压缩包
  • 适用于 Windows 10 的 OneGet

Source: https://laracasts.com/discuss/channels/laravel/homebrew-install-on-windows-os

来源:https: //laracasts.com/discuss/channels/laravel/homebrew-install-on-windows-os

回答by VonC

It shows "'brew' is not recognized as an internal or external command" in windows command prompt.

它在 Windows 命令提示符中显示“'brew' 未被识别为内部或外部命令”。

Not anymore, 19 months later (Feb. 2019, compared to July 2017)

不再,19 个月后(2019 年 2 月,与 2017 年 7 月相比)

At least, not on Windows 10, in a WSL (Windows Subsystem for Linux)session.
As mentioned by Mike McQuaid

至少,不是在 Windows 10 上,在WSL(Linux 的 Windows 子系统)会话中。
正如迈克·麦奎德提到的

Homebrew 2.0.0 has been released (at @FOSDEM!) with official Linux and Windows 10 WSL support, brew cleanuprunning automatically (opt-out with HOMEBREW_NO_INSTALL_CLEANUP), no more options in Homebrew/core and no longer running on OS X 10.8 and older.

Homebrew 2.0.0 已经发布(@FOSDEM!),支持官方 Linux 和 Windows 10 WSLbrew cleanup自动运行(选择退出HOMEBREW_NO_INSTALL_CLEANUP),Homebrew/core 中没有更多选项,不再在 OS X 10.8 及更早版本上运行。

See Homebrew 2.0.0.

参见Homebrew 2.0.0

“Homebrew on Linux” is called “Linuxbrew”.
You can install it in your home directory, so it does not require sudo, and use it to install software that your host distribution's package manager does not provide. Linuxbrewuses its own repository for formulae: Linuxbrew/homebrew-core.

“Linux 上的 Homebrew”被称为“ Linuxbrew”。
您可以将它安装在您的主目录中,因此它不需要sudo,并使用它来安装您的主机发行版的包管理器不提供的软件。 Linuxbrew使用自己的公式存储库:Linuxbrew/homebrew-core.

So again, this is not nativeWindows support, but Linux (through the WSL layer, on Windows 10).

同样,这不是原生Windows 支持,而是 Linux(通过 WSL 层,在 Windows 10 上)。

回答by Daniel O'Connell

As mentioned in the comments, Homebrew is a package manager for OSX, much like Aptitude in linux. You can't install Homebrew on Windows and never will be able to so you need to find a new way to accomplish what you are doing. I think you're trying to work with Google's V8 Javascript engine so why not try: https://github.com/phpv8/v8js

正如评论中提到的,Homebrew 是 OSX 的包管理器,很像 linux 中的 Aptitude。您无法在 Windows 上安装 Homebrew,也永远无法安装,因此您需要找到一种新方法来完成您正在做的事情。我认为您正在尝试使用 Google 的 V8 Javascript 引擎,所以为什么不尝试:https: //github.com/phpv8/v8js

回答by Steve Woods

Homebrew is a package manager for OS X. Windows can't use Homebrew. Even if there was a way to get pass that, the packages wouldn't work.

Homebrew 是 OS X 的包管理器。Windows 不能使用 Homebrew。即使有办法通过它,这些软件包也不起作用。

This link below might help you find an alternative.

下面的这个链接可能会帮助您找到替代方案。

http://alternativeto.net/software/homebrew/

http://alternativeto.net/software/homebrew/