• mac用pecl安装swoole可能出现的报错及解决办法


    一、用pecl安装swoole

    2018年4月,由于homebrew的变动,导致无法使用brew install的方式安装php的扩展,现在改为用pecl安装,pecl安装swoole的方法为:

    pecl install swoole

    出现在选项要填yes还是no,这篇文章有写:https://www.jianshu.com/p/14f542b7e5d0#comment-27164461

    二、可能出现的报错及解决方法

    可能出现的报错1:fatal error: 'openssl/ssl.h' file not found

    解决方法1:cp -R /usr/local/opt/openssl/include/openssl /usr/local/include

    解决方法2:ln -s /usr/local/opt/openssl/include/openssl /usr/local/include/openssl

    原因:一般用brew安装的软件,都会把需要include的文件自动放到/usr/local/include里的,但是不知为什么安装openssl的时候没有放到那里,所以要自己拷过去,其实最好的方法是做一个链接,即用解决方法2!

    可能出现的报错2:fatal error: 'hiredis/hiredis.h' file not found

    出现这个原因绝大多数是因为没有安装hiredis,用brew search hiredis看看有没安装,没有安装直接用brew install hiredis安装后,再次pecl install swoole就可以

    细心的童鞋会发现,brew install hiredis后,/usr/local/include里,多了一个hiredis,而且这个是一个软链,链接到/usr/local/Cellar/hiredis/0.13.3/include/hiredis

  • 相关阅读:
    关闭Pinterest通知
    android——创建camera应用(译)
    Android样式——Styles
    Android Fragment学习(一)
    Win32汇编环境配置
    关于微信检测SDK应用的原理浅析(iOS)
    iOS的Mantle实战
    Objective-C运行时的一些技巧
    Autolayout入门教程
    基于RAC的通用TableView
  • 原文地址:https://www.cnblogs.com/xiedie/p/9445066.html
Copyright © 2020-2023  润新知