Now you need to find out what version of PHP is installed on OSX

$ php -v
PHP 5.3.10 with Suhosin-Patch (cli) (built: Feb 20 2012 22:55:53) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

and then get the source code for that version

$ curl -O http://us.php.net/distributions/php-5.3.10.tar.gz

When the download have finished, you should unpack, find the PCNTL extension, phpize, configure, make and then make install

$ tar -xzvf php-5.3.10.tar.gf 
$ cd php-5.3.10/ext/pcntl
$ phpize
$ ./configure
$ make
$ sudo make install

 
sudo /Applications/XAMPP/xamppfiles/bin/phpize


sudo MACOSX_DEPLOYMENT_TARGET=10.7 CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" LDFLAGS="-arch i386 -arch x86_64 -bind_at_load" ./configure —enable-pcntl --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config


sudo make && sudo make install


 
 
 
 
我是真的不想重新编译,安装,因为我不知道会出现什么问题,而且麻烦,我就是不愿意。

后来找了一哥们跟我碰到的情况一样,http://ubuntuforums.org/showthread.php?t=549953,上面还是说,可以不重新编译php5就可以增加pcntl这个模块,用的还是phpize这个命令,而且他老大花了3个小时搞定……
那我就百度一下,phpize这个命令到底怎么搞,又有一哥们也碰到了我这样的问题,http://www.linuxsir.org/bbs/showthread.php?p=1763019,直接apt-get install php5-dev就可以了,这哥们从发帖求助到自己解决用了9分钟,还是07年的事情。
果然apt-get install php5-dev之后就有了phpize命令,然后按照第一个老外哥们的方法,解压php源代码之后,cd php/etc/pcntl,phpize,./configure,make,在module文件夹下就生成了pcntl.so文件,将其复制到php的extension_dir中,在php.ini文件中添加extension=pcntl.so,重启apache,搞定!
 

mac下安装pcntl的更多相关文章

  1. Mac 下安装Jenkins

    Mac 下安装Jenkins 开始 Jenkins是一个基于Java开发的一种持续集成工具,用于建工持续重复的工作,功能包括: 持续的软件版本发布/测试项目 监控外部调用执行的工作. 近期打算搭建自动 ...

  2. MAC下安装与配置MySQL

    MAC下安装与配置MySQL   MAC下安装与配置MySQL 一 下载MySQL 访问MySQL的官网http://www.mysql.com/downloads/ 然后在页面中会看到“MySQL ...

  3. Mac下安装UPnP Inspector

    由于工作中需要用到UPnP Inspector这个工具,而这个工具在windows下安装非常简单,在Mac下安装却很麻烦,在此记录安装流程. 这个工具依赖于两个其他的库:Coherence(一个DLN ...

  4. Mac下安装Wireshark,双击闪退

     Mac OS X上使用Wireshark抓包(http://blog.csdn.net/phunxm/article/details/38590561) Mac下安装Wireshark /Appli ...

  5. Mac下安装zshell

    Mac 下安装zshell 什么是shell 大多数命令行用户接触最多的是Bash,因为Bash是各个版本操作系统(Linux&Mac)的默认shell. 查看当前使用的shell $ ech ...

  6. 【高可用HA】Apache (1) —— Mac下安装Apache Httpd到自定义路径(非/etc/apache2)

    Mac下安装Apache Httpd httpd版本: httpd-2.4.17 参考来源: Tomcat Clustering - A Step By Step Guide Apache HTTP ...

  7. 《OD大数据实战》mac下安装nginx+php

    一.mac安装nginx + php + php-fpm  或apache + php 1. Mac 下 Nginx.MySQL.PHP-FPM 的安装配置 2. Mac下安装LNMP(Nginx+P ...

  8. Mac下安装HBase及详解

    Mac下安装HBase及详解 1. 千篇一律的HBase简介 HBase是Hadoop的数据库, 而Hive数据库的管理工具, HBase具有分布式, 可扩展及面向列存储的特点(基于谷歌BigTabl ...

  9. 在mac下安装jdk1.7(转)

    转自:http://vela.diandian.com/post/2012-01-06/15379924 最近呢,想玩玩jdk1.7,不过mac平台下的jvm一直都是Apple自己改的,所有有些麻烦. ...

随机推荐

  1. iOS利用单例实现不同界面间的数据传输

    首先写一个单例类,继承NSObject check.h文件中 @property(strong ,nonatomic) UITable * Table; @property(strong ,nonit ...

  2. And Then There Was One

    http://poj.org/problem?id=3517 And Then There Was One Time Limit: 5000MS   Memory Limit: 65536K Tota ...

  3. Matrix multiplication hdu4920

    Problem Description Given two matrices A and B of size n×n, find the product of them. bobo hates big ...

  4. 纯JS操作服务器绑定控件(Repeat)实现表头升降排序

    JS实现功能 var obj = function (id) { return "string" == typeof id ? document.getElementById(id ...

  5. App Thinning

    App Thinning 由于项目中需要开启Bitcode编译,之前对Bitcode也有些误区,故整理了下相关知识,仅供参考,如有不对,还请指出. 当前 iOS App 的编译打包方式是把适配兼容多个 ...

  6. alfresco 5.0 document

    http://docs.alfresco.com/community/tasks/imagemagick-config.html

  7. python(1) - 安装篇

    本次主要在windows下安装pyton2 和python3,实现 在cmd中输入 ptynon进入python2 在cmd中输入python3进入python3 第一步 当然是要下载python安装 ...

  8. linux开机启动配置

    vim /etc/rc.d/rc.local 把命令写在这里

  9. 【STL】全排列生成算法:next_permutation

    C++/STL中定义的next_permutation和prev_permutation函数是非常灵活且高效的一种方法,它被广泛的应用于为指定序列生成不同的排列. next_permutation函数 ...

  10. hdu 4632 动态规划

    思路:dp[i][j]表示区间(i,j)中回文串的个数,那么dp[i][j]=dp[i+1][j]+dp[i][j-1]-dp[i+1][j-1]:如果str[i]==str[j],那么dp[i][j ...