mac環境brew安裝freetype,imagick等yii2所須要的庫

以前整理了一下內置的php環境,各類缺庫是很坑爹的,並且內置的php編譯目錄找了老半天沒找到。因此決定使用brew去從新編譯一邊phpphp

brew的安裝就不說了,上篇博客有說。直入主題mysql

brew安裝完php後,切換默認使用redis

export PATH="$(brew --prefix homebrew/php/php55)/bin:$PATH"sql

export PATH="/usr/local/mysql/bin:$PATH"swoole

export PATH="/usr/local/sbin:$PATH"debug

在我以前我已經用pecl安裝過memcache,和redis,swoole了orm

如今換了php版本後要從新加載進來。homebrew

php --ini ip

sudo vi /usr/local/etc/php/5.5/php.ini博客

extension=/usr/lib/php/extensions/no-debug-non-zts-20121212/memcache.so

extension=/usr/lib/php/extensions/no-debug-non-zts-20121212/redis.so

extension=/usr/lib/php/extensions/no-debug-non-zts-20121212/swoole.so

zend_extension=/usr/lib/php/extensions/no-debug-non-zts-20121212/opcache.so

opcache.enable=1

opcache.enable_cli=1

 

ImageMagick安裝

 

 brew install php55-imagick 

出現:

Error: Formulae found in multiple taps: 

 * homebrew/php/php55-imagick

 * josegonzalez/php/php55-imagick

 

Please use the fully-qualified name e.g. homebrew/php/php55-imagick to refer the formula.

沒找到這個庫,網上解決方案,重置brew庫

brew untap josegonzalez/homebrew-php 

 brew install php55-imagick 

這下成功了。

相關文章
相關標籤/搜索