Composer The openssl extension is required for SSL/TLS protection
? ? Composer 是 PHP5以上 的一個依賴管理工具。它允許你申明項目所依賴的代碼庫,它會在你的項目中為你安裝他們。Composer 不是一個包管理器。是的,它涉及 "packages" 和 "libraries",但它在每個項目的基礎(chǔ)上進(jìn)行管理,在你項目的某個目錄中(例如 vendor)進(jìn)行安裝。默認(rèn)情況下它不會在全局安裝任何東西。因此,這僅僅是一個依賴管理。
? ? 安裝好Composer時通過composer install,發(fā)現(xiàn)沒有正常安裝,而是提示:
? [Composer\Exception\NoSslException]
? The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl extension, you can disable this error?, at your own risk, by setting the 'disable-tls' option to true.
? ?對于這個問題,我嘗試使用下面的命令解決:
[plain]?view plaincopy
? [Composer\Downloader\TransportException]
? Your configuration does not allow connections to http://packagist.org/packages.json. See https://getcomposer.org/doc/06-config.md#secure-http for details.
? ? 所以需要再次進(jìn)行設(shè)置,禁用SSL
[plain]?view plaincopy
? ? 之后,一部分可以正常安裝了,還有一部分提示超過300stimeout,所以對時間進(jìn)行設(shè)置:
? ??增加COMPOSER_PROCESS_TIMEOUT,通過命令composer config --list看到默認(rèn)是300s,然后通過命令composer config -g process-timeout 600增加COMPOSER_PROCESS_TIMEOUT至600s。
? ? 至此,Composer能夠正常運行。
================================================================
====Executing command 'composer update ?"topthink/framework" --no-interaction --no-ansi'====
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug [Composer\Exception\NoSslException] ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? The openssl extension is required for SSL/TLS protection but is not availab ? le. If you can not enable the openssl extension, you can disable this error ? , at your own risk, by setting the 'disable-tls' option to true. ? ? ? ? ? ?? update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>]...
====composer command completed with exit code 1====
解決方法:composer config -g -- disable-tls true
或者開啟php的ssl開啟
=================================================
來源:http://www.rabbit8.cn/576.html
總結(jié)
以上是生活随笔為你收集整理的Composer The openssl extension is required for SSL/TLS protection的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 平安智胜人生万能险十年后拿多少
- 下一篇: Failed to download Y