example:
# pecl install mongodb
出現以下錯誤訊息
Connection to `ssl://pecl.php.net:443' failed: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP?)

檢查 php -i | grep 'Registered Stream Socket Transports'
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, tls, tlsv1.0, tlsv1.1, tlsv1.2, tlsv1.3
明明有 ssl 啊

原來 pecl 使用的php cli 參數會加上 -n
也就是不參考 php.ini 的設定

偷吃步的解決方式
# vi /usr/local/bin/pecl
把 -n 的參數拿掉,存檔離開
exec $PHP -C -q $INCARG -d date.timezone=UTC -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv="On" $INCDIR/peclcmd.php "$@"
 

重新再安裝試試看 :D

undefined
 

arrow
arrow
    全站熱搜

    helloworld 發表在 痞客邦 留言(0) 人氣()