How do I install pcre with homebrew?

拟墨画扇 提交于 2020-01-15 11:11:55

问题


Background

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.

Problem

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

Questions

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?


回答1:


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

  • pcre-config
  • pcregrep
  • pcretest


来源:https://stackoverflow.com/questions/44112312/how-do-i-install-pcre-with-homebrew

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!