2016-07-29 2 views
1

Windows 7(64ビット)& WAMP(PHP VER 7.0.4)にMagento 2をインストールしました。Magento 2(cmd) - 致命的なエラー:未知のエラー:クラス 'Cli'が見つかりません

その後、次のコマンドを使用してキャッシュをクリーニングしてフラッシュしようとしています。

php bin/magento cache:clean 
php bin/magento cache:flush 

だから最初は、私に最新のPHPをインストールしたばかりのPHPバージョンエラーが出ていました。

いずれかが、このエラーを解決するために私を助けることができる php bin/magento cache:clean

D:\wamp64\www\m2>php bin/magento cache:clean 
The openssl extension is required for SSL/TLS protection but is not available. I 
f you can not enable the openssl extension, you can disable this error, at your 
own risk, by setting the 'disable-tls' option to true 
.... File list 
.... File list 
.... File list 


Fatal error: Uncaught Error: Class 'Cli' not found in D:\wamp64\www\m2\bin\magen 
to:31 
Stack trace: 
#0 {main} 
    thrown in D:\wamp64\www\m2\bin\magento on line 31 

そしてphp bin/magento cache:flush

The openssl extension is required for SSL/TLS protection but is not available. I 
f you can not enable the openssl extension, you can disable this error, at your 
own risk, by setting the 'disable-tls' option to true.#0 D:\wamp64\www\m2\vendor 
\composer\composer\src\Composer\Factory.php(306): Composer\Factory::createRemote 
Filesystem(Object(Composer\IO\BufferIO), Object(Composer\Config)) 
#1 D:\wamp64\www\m2\vendor\composer\composer\src\Composer\Factory.php(532): Comp 
oser\Factory->createComposer(Object(Composer\IO\BufferIO), Array, false) 
#2 D:\wamp64\www\m2\vendor\magento\framework\Composer\ComposerFactory.php(48): C 
omposer\Factory::create(Object(Composer\IO\BufferIO), 'D:\\wamp64\\www\\m...') 
#3 D:\wamp64\www\m2\vendor\magento\framework\Composer\ComposerInformation.php(36 
2): Magento\Framework\Composer\ComposerFactory->create() 
#4 D:\wamp64\www\m2\vendor\magento\framework\Composer\ComposerInformation.php(37 
5): Magento\Framework\Composer\ComposerInformation->getComposer() 
#5 D:\wamp64\www\m2\vendor\magento\framework\Composer\ComposerInformation.php(24 
2): Magento\Framework\Composer\ComposerInformation->getLocker() 
#6 D:\wamp64\www\m2\vendor\magento\framework\App\ProductMetadata.php(104): Magen 
to\Framework\Composer\ComposerInformation->getSystemPackages() 
#7 D:\wamp64\www\m2\vendor\magento\framework\App\ProductMetadata.php(65): Magent 
o\Framework\App\ProductMetadata->getSystemPackageVersion() 
#8 D:\wamp64\www\m2\vendor\magento\framework\Console\Cli.php(81): Magento\Framew 
ork\App\ProductMetadata->getVersion() 
#9 D:\wamp64\www\m2\bin\magento(22): Magento\Framework\Console\Cli->__construct(
'Magento CLI') 
#10 {main} 


Fatal error: Uncaught Error: Class 'Cli' not found in D:\wamp64\www\m2\bin\magen 
to:31 
Stack trace: 
#0 {main} 
    thrown in D:\wamp64\www\m2\bin\magento on line 31 

を実行中にエラーを次のコマンドを実行しながら、今では私に次のエラーを与えている

php -v 
PHP 7.0.9 (cli) (built: Jul 20 2016 10:47:41) (NTS) 
Copyright (c) 1997-2016 The PHP Group 
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies 

のOpenSSLがあなたにインストールされている場合

は...あなたはより多くの情報が必要な場合は私に知ら

答えて

1

チェックをしてみましょう...私はそれがPHPエラーに主に関連していると思いますが、私はそれを把握することはできませんシステムを使用して次のコマンドを実行します。

dpkg -l | grep -i openssl 

このコマンドで何も得られない場合は、OpenSSLをインストールする必要があります。

別の方法として、php.iniの設定ファイルにextension = php_openssl.dllのコメントを付けることができます。

私はこれがあなたを助けてくれることを願っています。

0

また、私のlocalhostのMagento2.1.2ではまったく同じ問題に直面しています。

The openssl extension is required for SSL/TLS protection but is not avaialable

解決方法は、php.iniのextension=php_openssl.dllのコメントを外してsslを有効にすることです。

私はそれを行い、私のxamppを再起動しましたが、それでも問題は解決されません。

Cliではphp --iniを実行しました。

これは、E:/xampp/php/php.iniからLoaded Configuration Fileを得た。私のマゼンタがD:/ xampp/localhostにあったところ。

つまり、magentoはDドライブにインストールされていますが、私の場合はphp.iniが別のxampp(E:/xampp/php/php.ini)から読み込まれます。

E:/xampp/php/php.iniのextension=php_openssl.dllのコメントがありません。問題が解決します。

したがって、すべてのPHP設定が読み込まれるphp.iniファイルでopensslを有効にします。そのファイルを知るにはphp --iniCliに実行してください。

解決しない場合はここにコメントしてください。

関連する問題