mac安裝lnmp環境中php擴充套件遇到的問題

2021-07-27 10:35:46 字數 2902 閱讀 4475

在裝好lnmp環境之後,執行php -m命令檢視php擴充套件時,碰到如下警告: 1.

cannot load xdebug - it was built with configuration api220131226,nts, whereas running engine is api220131226,nts,debug 2.

php warning:  php startup: xhprof: unable to initialize module

module compiled with build id=api20131226,nts

php    compiled with build id=api20131226,nts,debug

these options need to match

in unknown on line 0 3.

php warning:  php startup: unable to load dynamic library '/usr/local/opt/php56-gearman/gearman.so' - dlopen(/usr/local/opt/php56-gearman/gearman.so, 9): image not found in unknown on line 0

在參考了鏈結  之後,發現如下解決辦法:

123

45

php warning:  php startup: mcrypt: unable to initialize module

module compiled with build id=api20151012,nts

php compiled with build id=api20151012,nts,debug

these options need to match

in unknown on line 0

則用此命令重灌一下

1

brew reinstall mcrypt --build-from-source php70-mcrypt --build-from-source

1

php deprecated: php startup: memcached.sess_lock_wait and memcached.sess_lock_max_wait are deprecated. please update your configuration to use memcached.sess_lock_wait_min, memcached.sess_lock_wait_max and memcached.sess_lock_retries

in unknown on line 0deprecated: php startup: memcached.sess_lock_wait and memcached.sess_lock_max_wait are deprecated. please update your configuration to use memcached.sess_lock_wait_min, memcached.sess_lock_wait_max and memcached.sess_lock_retries

in unknown on line 0php deprecated: php startup: memcached.sess_lock_wait and memcached.sess_lock_max_wait are deprecated. please update your configuration to use memcached.sess_lock_wait_min, memcached.sess_lock_wait_max and memcached.sess_lock_retries

in unknown on line 0deprecated: php startup: memcached.sess_lock_wait and memcached.sess_lock_max_wait are deprecated. please update your configuration to use memcached.sess_lock_wait_min, memcached.sess_lock_wait_max and memcached.sess_lock_retries

in unknown on line 0php 7.0.2 (cli) (built: jan 7

2016

則需要修改一下配置檔案/usr/local/etc/php/7.0/conf.d/ext-memcached.ini,將以下兩句注釋:

1

2

;memcached.sess_lock_wait = 150000

;memcached.sess_lock_max_wait = 0

1

cannot load xdebug - it was built with configuration api320151012,nts, whereas running engine is api320151012,nts,debug

則用此命令重灌一下:

1

brew install php70-xdebug --build-from-source

我直接使用了一條命令,解決了其中遇到的大部分警告:

brew reinstall php56-pdo-dblib --build-from-source php56-pdo-dblib

--build-from-source

只要將php56-pdo-dblib替換成你要安裝的擴充套件,即可解決問題。特此記錄。其中深層次原因還有待解決,也請看到的朋友可以指點迷津。

mac 搭建lnmp環境

brew 1.5 版本以後將 php 轉至 core 維護。today i d like to announce homebrew 1.6.0.the most significant changes since 1.5.0 are brew install python installing py...

LNMP環境搭建 PHP編譯安裝

準備工作 php 官網位址 mysql 官網位址 php 安裝 先安裝一些通常來說應該已經有的元件,以防沒有可以檢查並安裝一下 yum y install gcc automake autoconf libtool make gcc c glibc安裝依賴庫 yum y install libmcr...

安裝LNMP環境

wget 2 安裝原始碼安裝依賴軟體 pcre devel zlib devel gcc gcc c make 檢測依賴是否安裝 rpm q pcre devel zlib devel gcc gcc c make openssl openssl devel yum安裝 sudo yum y ins...