Mac OSX编译安装php7.1.8
laravel中用到ldap认证包,要求php7.0以上版本,而且安装Mews\Captcha包的时候 验证码无法显示

报错如下:
Call to undefined function Intervention\Image\Gd\imagettfbbox()
搜索发现需要重新编译php,添加 --with-jpeg-dir=DIR
1.下载源码 http://mirrors.sohu.com/php
wget -c http://mirrors.sohu.com/php/php-7.1.7.tar.gz
tar -zxvf php-7.1.7.tar.gz
cd php-7.1.7
./configure --prefix=/usr/local/php7.1.7 \
--with-config-file-path=/usr/local/php7.1.7/etc \
--with-config-file-scan-dir=/usr/local/php7.1.7/etc/conf.d \
--with-apxs2=/usr/local/bin/apxs \
--enable-fpm \
--with-fpm-user=www \
--with-fpm-group=www \
--with-mysqli \
--with-pdo-mysql \
--with-iconv-dir \
--with-freetype-dir \
--with-zlib \
--with-jpeg-dir \
--with-png-dir \
--with-libxml-dir=/usr/bin/xml2-config \
--enable-xml \
--disable-rpath \
--enable-bcmath \
--enable-shmop \
--enable-sysvsem \
--enable-inline-optimization \
--with-curl \
--enable-mbregex \
--enable-mbstring \
--with-mcrypt \
--enable-ftp \
--with-gd \
--enable-gd-native-ttf \
--with-openssl=/usr/local/Cellar/openssl/1.0.2o_1 \
--with-mhash \
--enable-pcntl \
--with-ldap \
--enable-sockets \
编译的过程遇到的问题
1.apxs报错的问题
Sorry, I cannot run apxs. Possible reasons follow: . Perl is not installed
. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
. Apache was not built using --enable-so (the apxs usage page is displayed) 解决办法
brew install httpd,然后
find / -name apxs
Centos下执行 yum install -y httpd-devel 查找到apxs文件路径,然后修改编译参数如下
--with-apxs2=/usr/local/bin/apxs
.configure: error: OpenSSL version 1.0. or greater required. 解决办法:
brew upgrade openssl
然后修改编译参数为 openssl的实际路径 --with-openssl=/usr/local/Cellar/openssl/1.0.2o_1
上述路径根据自己的环境灵活修改
Centos下 需要 yum install openssl openssl-devel
然后ln -s /usr/lib64/lib
configure: error: Cannot find ldap libraries in /usr/lib
解决办法:
cp -frp /usr/lib64/libldap* /usr/lib/
然后再./configure ...即可
报错信息
/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_scanf'
/usr/lib64/liblber-2.4.so.: error adding symbols: DSO missing from command line
collect2: error: ld returned exit status
make: *** [sapi/cli/php] 错误 解决办法: ./configure后
编辑MakeFile
找到 开头是 'EXTRA_LIBS' 这一行 在结尾加上 '-llber' 然后执行 make && make install
参考地址:
https://www.jianshu.com/p/dff29b4566a6
Mac OSX编译安装php7.1.8的更多相关文章
- Mac OSX编译安装php5.6
安装好OSX 10.13以后默认自带的php7.1.7,跟现有环境不兼容,所以准备编译安装php5.6,自带的php7不建议卸载,重新安装一份php5.6 1.安装php的一些依赖,推荐使用brew安 ...
- Mac Pro 编译安装 Redis 的 PHP 客户端 phpredis
1.去官网下载 redis 扩展源码包 https://github.com/phpredis/phpredis 2.安装 redis 扩展 /usr/local/src/mac-sdk/source ...
- 编译安装PHP7并安装Redis扩展Swoole扩展
编译安装PHP7并安装Redis扩展Swoole扩展 在编译php7的机器上已经有编译安装过php5.3以上的版本,从而依赖库都有了 本php7是编译成fpm-php 使用的, 如果是apache那么 ...
- 【安装PHP】如何在openSUSE42.1下编译安装PHP7
首先推荐一篇文章PHP 7 Release Date Arrived: Will Developers Adopt PHP 7? - PHP Classes blog. 里面说到是否会去使用PHP7, ...
- Mac Pro 编译安装 Redis-3.2.3
Redis官方下载地址:http://redis.io/download Redis安装 cd /usr/local/src/redis-3.2.3 sudo make sudo make insta ...
- 全志a20安卓电视盒子安装可道云kodexplorer服务-编译安装php7.3+nginx
可道云真的很强大,安装包很小,功能却很齐全,还可以自定义轻应用如果有手机客户端就更好了 研究了一下,可道云根目录放到外置存储设备(移动硬盘)会更合适,改路径的方法下面有提到上传文件时一个文件会在用户目 ...
- centos7.6编译安装php7.2.11及redis/memcached/rabbitmq/openssl/curl等常见扩展
centos7.6编译安装php7..11及redis/memcached/rabbitmq/openssl/curl等常见扩展 获取Php的编译参数方法: [root@eus-api-cms-bac ...
- 在Mac OSX下安装Microsoft Calibri字体
参考: Where can I find default Microsoft fonts Calibri, Cambria? 在Mac OSX下安装Microsoft Calibri字体 1.下载: ...
- centos7下编译安装php-7.0.15(PHP-FPM)
centos7下编译安装php-7.0.15(PHP-FPM) 一.下载php7源码包 http://php.net/downloads.php 如:php-7.0.15.tar.gz 二.安装所需依 ...
随机推荐
- 阶段3 3.SpringMVC·_03.SpringMVC常用注解_8 SessionAttributes注解
SpringMvc提供的Model类 ModelMap继承LinkedHashMap 页面取值 把request这个对象全部输出了. SessionAttribute 取值 从sessionAttri ...
- js高程之作用域
我们知道js执行环境有全局环境(window)和局部环境(一般指函数环境)之分. ; function calc(){ ; } 上述代码,虽然有两个num变量,但是他们所在的执行环境却是不同的,第一个 ...
- go语言20小时从入门到精通(六、工程管理)
在实际的开发工作中,直接调用编译器进行编译和链接的场景是少而又少,因为在工程中不会简单到只有一个源代码文件,且源文件之间会有相互的依赖关系.如果这样一个文件一个文件逐步编译,那不亚于一场灾难. Go语 ...
- docker中tomcat日志输出自定义
一,默认tomcat日志配置文件 /data/tomcat/conf/logging.properties 1,修改tomcat/conf下的logging.properties [root@harb ...
- Git-T
或在命令行上创建一个新的存储库echo“#gittest”>> README.md git init git add README.md git commit -m“first commi ...
- P5019 铺设道路
#include<bits/stdc++.h> using namespace std; ]; ; int main() { cin>>n; ;i<=n;i++) cin ...
- Windows下安装jdk-12.0.2
Java更新到12,新版本的Java中不再存在jre,配置环境变量有所改变. 下载最新jdk 下载地址:https://www.oracle.com/technetwork/java/javase/d ...
- Ubuntu安装deepin wine版QQ
1.安装deepin wine环境 https://github.com/wszqkzqk/deepin-wine-ubuntu 直接下载zip包(或者用git方式克隆) 使用unzip解压到指定文件 ...
- 【并行计算-CUDA开发】Windows下opencl环境配置
首先声明我这篇主要是根据下面网站的介绍, 加以修改和详细描述,一步一步在我自己的电脑上实现的, http://www.cmnsoft.com/wordpress/?tag=opencl&pag ...
- the property “***” on could not be set to a null value
在建立EF框架的时候,创建实体时由于部分数据库类型和.net类型不同,比如int类型,在数据库中是可空类型,而.net中是不允许的,所以创建实体的时候,数据库的int类型对应的实体类型应该为int?类 ...