Quantcast
Channel: PHP8タグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 546

PHP8.1でPECLが使えなかったので修正した話

$
0
0
PHP8.1にバージョンアップしpeclでインストールを行おうとした際に発生した問題です.解決方法まで書いていきます. 基本情報 $ cat /etc/os-release NAME="Ubuntu" VERSION="20.04.3 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.3 LTS" VERSION_ID="20.04" $ php -v PHP 8.1.1 (cli) (built: Dec 31 2021 07:26:20) (NTS) Copyright (c) The PHP Group Zend Engine v4.1.1, Copyright (c) Zend Technologies with Zend OPcache v8.1.1, Copyright (c), by Zend Technologies 問題 MongoDBとの接続のためPHPのドライバーを入れる際に発生しました $ sudo pecl install mongodb PHP Warning: foreach() argument must be of type array|object, null given in /usr/share/php/PEAR/Command.php on line 249 XML Extension not found a~~~~! XML拡張機能が見つからないのね 解決 ということでXML拡張機能をインストールします $ sudo apt-get install php-xml php8.1-xml 最後に問題のあったコードを再度実行します $ sudo pecl install mongodb WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update downloading mongodb-1.12.0.tgz ... Starting to download mongodb-1.12.0.tgz (1,392,375 bytes) ...................................................................................................................................................................................................................................................................................done: 1,392,375 bytes 633 source files, building 問題なく実行できたのでOKです

Viewing all articles
Browse latest Browse all 546

Trending Articles