Huixxi commented on issue #1382:
URL: 
https://github.com/apache/incubator-brpc/issues/1382#issuecomment-1149797181

   本机(M1 Macbook Pro 
13inc)验证通过,参照更新后的[getting_started.md](https://github.com/apache/incubator-brpc/blob/master/docs/cn/getting_started.md#macos)文档,附上戈神的PR:https://github.com/apache/incubator-brpc/commit/efa9989e99dce0bb5f8e26818574748c7ef45059。
   除此之外,大家可能还会遇到几个比较基础的坑(本人踩过的):
   
   - 如遇到Homebrew镜像源失效mac brew xxx问题,则需要更新下载源,并升级brew,解决方法如下:
   ```
   $ export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.ustc.edu.cn/brew.git";
   $ brew update
   ```
   - 在sh config_brpc.sh .... 这一步骤之后,遇到错误:“gnu-getopt must be installed and 
used”,则需要使用如下命令安装gnu-getopt,如果依旧反复出错,则需要通过重启Mac来解决。
   ```
   brew install gnu-getopt
   ```
   - 在有就是Fail to find gflags/protobuf/leveldb/gflags/gflags.h from 
--libs,也就是说在/usr/local/lib这个路径下找不到这些包,原因戈神在新的getting_start.md里面也提到了,新的MacOS下的brew安装路径发生了改变,通过里面提到了的软链的方式应该能解决,但我就比较笨了,当时是通过如下方式解决的:
   ```
   $ sh config_brpc.sh --headers=/opt/homebrew/include --libs=/opt/homebrew/lib 
--cc=clang --cxx=clang++
   ```
   - 
最后就是make之后,又报错找不到openssl的错误,这个在新文档中也提到了,也是通过软链的方式解决,我当时的解决方案是参考:https://stackoverflow.com/questions/42044221/openssl-not-found-on-macos-sierra
 (唯一有效方式)
   ```
   $ brew link openssl --force
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to