如何使用自制软件安装pcre? [英] How do I install pcre with homebrew?

查看:104
本文介绍了如何使用自制软件安装pcre?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景

我有一个正则表达式,我想跨多行运行.我的理解是OSX的grep无法处理此问题(如果我错了,请纠正我!).因此,经过一番谷歌搜索后,我发现PCRE可以满足我的要求.我尝试使用brew install pcre进行安装,如一些站点所建议.这似乎奏效了.如果再次运行brew install pcre,则会出现此错误Warning: pcre-8.40 already installed,并且我有一个/usr/local/Cellar/pcre/8.40/目录.

I have a regex I want to run across multiple lines. My understanding is that OSX's grep can't handle this (please correct me if I'm wrong!). So after some Googling I found that PCRE would do what I want. I tried to install it with brew install pcre as a few sites suggested. It seems to have worked. If I run brew install pcre again I get this error Warning: pcre-8.40 already installed and I have a /usr/local/Cellar/pcre/8.40/ directory.

问题

通过自制软件安装PCRE后,尝试使用pcre命令时出现此错误pcre: command not found.

After installing PCRE via homebrew I get this error pcre: command not found when I try to use the pcre command.

问题

brew install pcre之后是否还需要执行第二步?我没有为此列出任何东西,但也许我错过了.我还找到了这些说明,用于手动安装PCRE.通过自制程序进行此操作是否有不利之处?

Is there a second step I need to run after brew install pcre? I didn't find anything listed for this, but perhaps I missed it. I also found these instructions for installing PCRE manually. Is there a downside to doing this over homebrew?

推荐答案

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

homebrew-core/pcre package is shipped with these binaries, so you probably need to try them:

  • pcre-config
  • pcregrep
  • pcretest
  • pcre-config
  • pcregrep
  • pcretest

这篇关于如何使用自制软件安装pcre?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆