Laravel Swoole

透過 php 的 pecl 安裝 swoole

Gary Ng
4 min readOct 8, 2020

2. 期間會詢問是否開啟 https, openssl 等, openssl 需要特別指定 library

— with-openssl-dir=/usr/local/Cellar/openssl/1.0.2t

ps: swoole 位於 mac 的 /usr/local/lib/php/20180731

ps: php.ini 位於 mac 的 /usr/local/etc/php/7.3/

ps: php extension 位於 /usr/lib/php/extensions/no-debug-non-zts-20160303

3. 可能會發生 dyld 載入問題, 可以用以下方式處理

  1. cd /usr/local/Cellar/openssl 查看 openssl 1.0.2t版本
  2. brew switch openssl 切換成第一步驟看到的版本

4. 進到有安裝 laravel swoole 的專案執行以下指令

php artisan swoole:http start

安裝 openssl 1.0.2t 方法

wget https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rbbrew install openssl.rb

5. Brew 問題處理

rm -rf "$(brew --repo homebrew/core)"
brew tap homebrew/core
brew update

新版 mac openssl 有問題可以參考以下方式

參考資料:

--

--

Gary Ng
Gary Ng

Written by Gary Ng

軟體工程師、後端工程師

No responses yet