N
N
Nick Bukovskiy2017-03-29 21:45:22
Composer
Nick Bukovskiy, 2017-03-29 21:45:22

How to fix composer install error (SLL/TLS)?

I use vb on which there is an ubuntu with the server. I have a project with composer.lock and composer.json. When I run composer install it shows the following error:

[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.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
andrewua85, 2019-12-03
@andrewua85

try this:
composer config -g -- disable-tls true
and re-run your composer. He works with me!
But this is not safe and is not recommended for your server. The official site says:
If set to true, all HTTPS URLs will be validated using HTTP instead, and no network level encryption will be performed. Enabling this is a security risk and is NOT recommended. Your best bet is to enable the php_openssl extension in php.ini.
If you don't want to include a non-secure layer on your machine/server then configure your php to enable openssl and it also works. Make sure the PHP Openssl extension is installed and enable it in the php.ini file.
To enable OpenSSL, add or find and uncomment this line in your php.ini file:
Linux/OSx:
extension=php_openssl.so
Windows:
extension=php_openssl.dll
Restart php-fpm/web server if necessary!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question