![PHP アプリケーションには mbstring ライブラリが必要です - EC2 にインストールできません](https://rvso.com/image/658727/PHP%20%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AB%E3%81%AF%20mbstring%20%E3%83%A9%E3%82%A4%E3%83%96%E3%83%A9%E3%83%AA%E3%81%8C%E5%BF%85%E8%A6%81%E3%81%A7%E3%81%99%20-%20EC2%20%E3%81%AB%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93.png)
私の電子商取引サイトのライブラリには、PHP mbstring ライブラリが必要です。 簡単そうですが、実行するだけです:
yum install php-mbstring
しかし、私はこう思います:
[ec2-user@ip-172-0-0-0 modules]$ sudo yum install php-mbstring
Loaded plugins: priorities, update-motd, upgrade-helper
Resolving Dependencies
--> Running transaction check
---> Package php-mbstring.x86_64 0:5.3.29-1.8.amzn1 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.29-1.8.amzn1 for package: php-mbstring-5.3.29-1.8.amzn1.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.3.29-1.8.amzn1 will be installed
--> Processing Conflict: php56-common-5.6.8-1.111.amzn1.x86_64 conflicts php-common < 5.5.22-1.98
--> Finished Dependency Resolution
Error: php56-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
拡張機能を有効にしようとしましたが、エラーが発生します:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/5.6/modules/mbstring.so'^
次に何を試したらいいのか全く分かりません...
答え1
システムに PHP 5.6 がインストールされていますが、PHP 5.3 をyum
インストールしようとしています。mbstring
mbstring
PHP 5.6 をインストールしたのと同じ方法で拡張機能をインストールする必要があります。