Ubuntu installation composer, error: tls_process_server_certificate.

my server environment is ubuntu16.04, and then I compile and install php7.2.4, and finally install composer, there is an error.
the command I executed (follow the first step of the installation step of the composer official website):

 php -r "copy("https://getcomposer.org/installer", "composer-setup.php");"

after the execution is complete, the following error message appears:

Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in Command line code on line 1

Warning: copy(): Failed to enable crypto in Command line code on line 1

Warning: copy(https://getcomposer.org/installer): failed to open stream: operation failed in Command line code on line 1

in the face of this problem, I have made the following attempts:

  1. neither Baidu nor google found a valid solution.
  2. suspected to be a problem with php"s ssl certificate, so downloaded the ca certificate provided by curl"s official website, and modified the openssl.cafile=., result in php.ini as before.
  3. suspected that ssl was not installed correctly, so trying to compile and install openssl and curl, and then recompile and install php, did not solve.
  4. suspects that there is a mistake in compiling the ssl method, so there is still a problem of using the aptitude tool to install all php dependent libraries, including curl and openssl, to recompile and install php,.
  5. check the installation of the php extension, execute php-m , and find that the installation of the extension is intact and the openssl library has been installed.

has been messing around for two days. At present, the problem of unable to lock is whether it is here in php, here in openssl software, or in the system.

Mar.01,2021

add -- no-check-certificate parameters


just access the download directly. Change your name. If it is not local, upload it with sftp

.

clipboard.png

or this curl-sS https://getcomposer.org/installer | php

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bec0a6-31abd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bec0a6-31abd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?