composer-php 安装失败 laravel
composer-php fail to install laravel
我正在尝试将 laravel 项目移动到远程服务器。
我只是复制 public/html 文件夹中的文件夹,然后我尝试按照此处所述安装作曲家:
https://getcomposer.org/download/
使用第一个命令我看到了这个错误:
/federlegno$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
PHP 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
PHP Warning: copy(): Failed to enable crypto in Command line code on line 1
PHP Warning: copy(https://getcomposer.org/installer): failed to open stream: operation failed in Command line code on line 1
作为解决方案,我找到 运行 没有 https 的命令:php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
然后似乎其他命令有效,没有提示任何错误(我什至尝试使用浏览器访问 link,它有效!)。
然后当我尝试 运行:
composer install
在 laravel 文件夹中出现此错误:
bash: composer: command not found
一些附加信息:
/federlegno$ php -r "phpinfo();" | grep OpenSSL SSL Version =>
OpenSSL/1.0.2r OpenSSL support => enabled OpenSSL Library Version =>
OpenSSL 1.1.0j 20 Nov 2018 OpenSSL Header Version => OpenSSL 1.1.1a
20 Nov 2018 Native OpenSSL support => enabled
php版本:
ederlegno$ php -v PHP
7.2.15-1+0~20190209065123.16+stretch~1.gbp3ad8c0 (cli) (built: Feb 9 2019 06:51:24) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.15-1+0~20190209065123.16+stretch~1.gbp3ad8c0, Copyright (c) 1999-2018, by Zend Technologies
Laravel 版本 5.4
您应该将 composer.phar
文件(由安装脚本下载)移动到 /usr/local/bin
或 /usr/bin
目录
sudo mv composer.phar /usr/local/bin/composer
或
sudo mv composer.phar /usr/bin/composer
我正在尝试将 laravel 项目移动到远程服务器。 我只是复制 public/html 文件夹中的文件夹,然后我尝试按照此处所述安装作曲家: https://getcomposer.org/download/
使用第一个命令我看到了这个错误:
/federlegno$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" PHP 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 PHP Warning: copy(): Failed to enable crypto in Command line code on line 1 PHP Warning: copy(https://getcomposer.org/installer): failed to open stream: operation failed in Command line code on line 1
作为解决方案,我找到 运行 没有 https 的命令:php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
然后似乎其他命令有效,没有提示任何错误(我什至尝试使用浏览器访问 link,它有效!)。
然后当我尝试 运行:
composer install
在 laravel 文件夹中出现此错误:
bash: composer: command not found
一些附加信息:
/federlegno$ php -r "phpinfo();" | grep OpenSSL SSL Version => OpenSSL/1.0.2r OpenSSL support => enabled OpenSSL Library Version => OpenSSL 1.1.0j 20 Nov 2018 OpenSSL Header Version => OpenSSL 1.1.1a 20 Nov 2018 Native OpenSSL support => enabled
php版本:
ederlegno$ php -v PHP
7.2.15-1+0~20190209065123.16+stretch~1.gbp3ad8c0 (cli) (built: Feb 9 2019 06:51:24) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.15-1+0~20190209065123.16+stretch~1.gbp3ad8c0, Copyright (c) 1999-2018, by Zend Technologies
Laravel 版本 5.4
您应该将 composer.phar
文件(由安装脚本下载)移动到 /usr/local/bin
或 /usr/bin
目录
sudo mv composer.phar /usr/local/bin/composer
或
sudo mv composer.phar /usr/bin/composer