在 macOS Movaje 10.14 中安装 Homebrew + nginx + rtmp

Posted

技术标签:

【中文标题】在 macOS Movaje 10.14 中安装 Homebrew + nginx + rtmp【英文标题】:Installing Homebrew + nginx + rtmp in macOS Movaje 10.14 【发布时间】:2020-05-21 09:09:23 【问题描述】:

我能够在 macOS High Sierra 10.13 中安装 Homebrew + nginx + rtmp。现在我想在 macOS Mojave 10.14 上做同样的事情。

那么让我们开始吧……安装 Homebrew,首先我们需要终端中的 Xcode……

xcode-select –install

比。我们需要自制软件

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

比安装 nginx + rtmp

问题就在这里

我试过了:

brew install nginx-full --with-rtmp-module

但它不会工作

结果:

Updating Homebrew...
Usage: brew install [options] formula

Install formula. Additional options specific to formula may be appended to the command.

Unless HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will then be run for
the installed formulae or, every 30 days, for all formulae.

    -d, --debug                      If brewing fails, open an interactive
                                     debugging session with access to IRB or a
                                     shell inside the temporary build directory.
        --env                        If std is passed, use the standard build
                                     environment instead of superenv. If super
                                     is passed, use superenv even if the formula
                                     specifies the standard build environment.
        --ignore-dependencies        An unsupported Homebrew development flag to
                                     skip installing any dependencies of any
                                     kind. If the dependencies are not already
                                     present, the formula will have issues. If
                                     you're not developing Homebrew, consider
                                     adjusting your PATH rather than using this
                                     flag.
        --only-dependencies          Install the dependencies with specified
                                     options but do not install the formula
                                     itself.
        --cc                         Attempt to compile using the specified
                                     compiler, which should be the name of the
                                     compiler's executable, e.g. gcc-7 for GCC
                                     7. In order to use LLVM's clang, specify
                                     llvm_clang. To use the Apple-provided
                                     clang, specify clang. This option will
                                     only accept compilers that are provided by
                                     Homebrew or bundled with macOS. Please do
                                     not file issues if you encounter errors
                                     while using this option.
    -s, --build-from-source          Compile formula from source even if a
                                     bottle is provided. Dependencies will still
                                     be installed from bottles if they are
                                     available.
        --force-bottle               Install from a bottle if it exists for the
                                     current or newest version of macOS, even if
                                     it would not normally be used for
                                     installation.
        --include-test               Install testing dependencies required to
                                     run brew test formula.
        --devel                      If formula defines it, install the
                                     development version.
        --HEAD                       If formula defines it, install the HEAD
                                     version, aka. master, trunk, unstable.
        --fetch-HEAD                 Fetch the upstream repository to detect if
                                     the HEAD installation of the formula is
                                     outdated. Otherwise, the repository's HEAD
                                     will only be checked for updates when a new
                                     stable or development version has been
                                     released.
        --keep-tmp                   Retain the temporary files created during
                                     installation.
        --build-bottle               Prepare the formula for eventual bottling
                                     during installation, skipping any
                                     post-install steps.
        --bottle-arch                Optimise bottles for the specified
                                     architecture rather than the oldest
                                     architecture supported by the version of
                                     macOS the bottles are built on.
    -f, --force                      Install without checking for previously
                                     installed keg-only or non-migrated
                                     versions.
    -v, --verbose                    Print the verification and postinstall
                                     steps.
        --display-times              Print install times for each formula at the
                                     end of the run.
    -i, --interactive                Download and patch formula, then open a
                                     shell. This allows the user to run
                                     ./configure --help and otherwise
                                     determine how to turn the software package
                                     into a Homebrew package.
    -g, --git                        Create a Git repository, useful for
                                     creating patches to the software.
    -h, --help                       Show this message.
Error: invalid option: --with-rtmp-module

所以我尝试了:

brew install nginx --with-rtmp-module

但是.....结果:

Updating Homebrew...
Error: No available formula with the name "–with-rtmp-module" 
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.

所以我决定先尝试安装 nginx,然后再安装 rtmp 模块

brew install nginx

比我试过的:

    brew install nginx libnginx-mod-rtmp(从 Linux 复制) brew install rtmp-module brew install module-rtmp

但以上都没有奏效。我该如何解决?

【问题讨论】:

我先找到解决方案'brew tap denji/nginx' 【参考方案1】:

你应该在尝试安装 nginx-full 之前点击一个 nginx 公式

好吧,你可以试试denji/nginx,因为 homebrew/nginx tap 已被弃用,那就是:

brew tap denji/nginx

然后

brew install nginx-full --with-rtmp-module

这对我有用。

【讨论】:

以上是关于在 macOS Movaje 10.14 中安装 Homebrew + nginx + rtmp的主要内容,如果未能解决你的问题,请参考以下文章

教程篇macOS 10.14 MAC应用无法打开或文件已损坏处理方法

在 macOS 中安装 pyqt 的问题

手把手教你用虚拟机安装MacOS 10.14!!!

在 MacOS 中安装 gcutil 时收到错误

如何使用自制软件在 macOS 中安装以前版本的 Python 3?

如何在macos中安装emacs