本文实例讲述了php7安装yar扩展的方法。分享给大家供大家参考,具体如下:
体验RPC框架Yar需要:
1. 装二进制打包协议msgpack
2. 装yar拓展和依赖
一. 安装二进制打包协议msgpack
1. 安装PHP拓展包有很多种方式,当然没什么是比pecl更加来得暴力,用这个之前要确认phpize是否存在
find / -name phpize2. 如果phpize不存在
yum install php-devel3. Ok,先装msgpack
pecl install msgpack安装跳了一大堆编译过程过程,省略ING 只关心后几行
Build process completed successfully Installing '/usr/include/php/ext/msgpack/php_msgpack.h' Installing '/usr/lib64/php/modules/msgpack.so' install ok: channel://pecl.php.net/msgpack-0.5.6 configuration option "php_ini" is not set to php.ini location You should add "extension=msgpack.so" to php.ini安装完 msgpack.so 会自动复制到 php 扩展库,并写好配置。
二. 安装 yar
1. 下载 yar
wget http://pecl.php.net/get/yar-2.0.0.tgz2. 解压编译
tar -zxvf yar-2.0.0.tgz cd cd yar-2.0.0 /usr/bin/phpize ./configure --with-php-config=/usr/bin/php-config7.0*遇到问题:
checking for cURL in default path... not found configure: error: Please reinstall the libcurl distribution - easy.h should be in <curl-dir>/include/curl/
3. 安装 curl-devel
yum -y install curl-devel sudo apt-get install libcurl4-gnutls-devps:curl vs curl-deval
参考: 》、、、
希望本文所述对大家PHP程序设计有所帮助。
查看更多关于php7安装yar扩展的方法详解的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did2976