gpt4 book ai didi

homebrew - 如何使用 Homebrew 软件安装 pcre?

转载 作者:行者123 更新时间:2023-12-04 12:18:25 25 4
gpt4 key购买 nike

背景

我有一个正则表达式,我想跨多行运行。我的理解是 OSX 的 grep 无法处理这个(如果我错了,请纠正我!)。所以经过一些谷歌搜索后,我发现 PCRE 会做我想做的事。我试着用 brew install pcre 安装它正如一些网站所建议的那样。它似乎奏效了。如果我运行 brew install pcre我再次收到此错误 Warning: pcre-8.40 already installed我有一个 /usr/local/Cellar/pcre/8.40/目录。

问题

通过 Homebrew 软件安装 PCRE 后,我收到此错误 pcre: command not found当我尝试使用 pcre命令。

问题

我需要在 brew install pcre 之后运行第二步吗? ?我没有找到任何列出的内容,但也许我错过了。我还找到了 these instructions用于手动安装 PCRE。在 Homebrew 软件上这样做有什么缺点吗?

最佳答案

homebrew-core/pcre软件包随这些二进制文件一起提供,因此您可能需要尝试它们:

  • pcre-config
  • pcregrep
  • pcretest
  • 关于homebrew - 如何使用 Homebrew 软件安装 pcre?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44112312/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com