PHP 7.2.30 install pcntl extension

  1. Download source code
    wget http://cn.php.net/distributions/php-7.2.30.tar.xz
    

    Note: You can also install through pecl install pcntl or pecl download pcntl , attached: download and install the pecl script cd /usr/local/php/bin/ curl -o go-pear.php http://pear.php.net/ go-pear.phar        ./php go-pear.php

  2. Unzip
    tar -xzvf php-7.2.30.tar.gz
    

     

  3. To the contents of pcntl extension
    cd php-7.2.30/ext/pcntl
    

     

  4. Compile

    /Applications/MAMP/bin/php/php7.2.30/bin/phpize
    ./configure --prefix=/Applications/MAMP/bin/php/php7.2.30/bin/php --with-php-config=/Applications/MAMP/bin/php/php7.2.30/bin/php-config 
    make && make install
    #输出类似下文
    Installing shared extensions:    
    /Applications/MAMP/bin/php/php7.2.30/lib/php/extensions/no-debug-non-zts-20170718/
    

     

  5. Find out the location of the current PHP configuration file

    php -i | grep Loaded
    # 输出
    Loaded Configuration File => /Library/Application Support/appsolute/MAMP PRO/conf/php7.2.30.ini
    libXML Loaded Version => 20800
    Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password,auth_plugin_caching_sha2_password,auth_plugin_sha256_password
    

     

    It can be seen that the configuration file is:/Library/Application Support/appsolute/MAMP PRO/conf/php7.2.30.ini

  6. Edit the configuration file, add a lineextension=pcntl.so

  7. Check if the installation is successful
    php --ri pcntl

Guess you like

Origin blog.csdn.net/JineD/article/details/113122709