安装Composer PHP Warning: copy(): SSL operation failed with code 1.
来源:互联网 发布:我的世界随机性知乎 编辑:程序博客网 时间:2024/06/16 11:10
报错信息
[root@localhost ~]# php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"PHP Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in Command line code on line 1Warning: copy(): SSL operation failed with code 1. OpenSSL Error messages:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in Command line code on line 1PHP Warning: copy(): Failed to enable crypto in Command line code on line 1Warning: copy(): Failed to enable crypto in Command line code on line 1PHP Warning: copy(https://install.phpcomposer.com/installer): failed to open stream: operation failed in Command line code on line 1Warning: copy(https://install.phpcomposer.com/installer): failed to open stream: operation failed in Command line code on line 1
解决方法
- 应该是CA证书验证失败造成的错误,下载个CA证书
[root@localhost ~]# wget http://curl.haxx.se/ca/cacert.pem[root@localhost ~]# mv cacert.pem /usr/local/openssl/ssl/certs/cacert.pem[root@localhost ~]# vim /yourpath/php.ini
- 修改cafile路径,保存
[openssl]; The location of a Certificate Authority (CA) file on the local filesystem; to use when verifying the identity of SSL/TLS peers. Most users should; not specify a value for this directive as PHP will attempt to use the; OS-managed cert stores in its absence. If specified, this value may still; be overridden on a per-stream basis via the "cafile" SSL stream context; option.;openssl.cafile=openssl.cafile=/usr/local/openssl/ssl/certs/cacert.pem
阅读全文
0 0
- 安装Composer PHP Warning: copy(): SSL operation failed with code 1.
- 安装composer时Warning: readfile(): SSL operation failed with code 1. OpenSSL Error messages:
- 安装 composer SSL operation failed with code 1
- phpmailer发送邮件出现错误:stream_socket_enable_crypto(): SSL operation failed with code 1.
- Preverification failed with error code 1.
- Warning: post-commit hook failed (exit code 255) with no output
- SVN报错Warning: post-commit hook failed (exit code 1) with output:
- Qt Windows 安装问题RtlWerpReportException failed with status code :-1073741823
- windows安装 Composer (PHP)
- ubuntu 安装 php Composer
- php 安装composer
- php安装composer
- PHP Composer 的安装
- PHP Composer :安装流程
- Windows安装Composer出现Composer Security Warning警告的解决方法
- php Composer出现SSL报错
- PHP Warning: proc_open(): fork failed
- linux 安装 composer 提示 "If possible you should enable it or recompile php with --with-openssl"
- Java final修饰符
- java中的sleep()和wait()的区别
- java字符串拼接指定内容-左右组合(left/right padding)
- Android okhttp3 post get put 提交
- 从0开始学习 GitHub 系列之【了解Git】
- 安装Composer PHP Warning: copy(): SSL operation failed with code 1.
- Nginx和CORS
- 如何建设高质量外链的烦恼
- SQL:判断字段是否为空或空字符串
- 洛谷 1029 最大公约数和最小公倍数问题
- Spring Boot Spring Data Jpa全解之分页特殊查询
- CSS控制div不换行,超过部分用点表示
- C#中使用HtmlAgilityPack对html进行解析
- POIexcel导出工具类