简体   繁体   English

如何安装作曲家?

[英]How install composer?

I downloaded the project.我下载了这个项目。 My task to run this project through the xampp server.我的任务是通过 xampp 服务器运行这个项目。 They told me to install composter to the server.他们告诉我在服务器上安装堆肥。

I downloaded the project into htdocs/mysite/ I install composer我将项目下载到 htdocs/mysite/ 我安装了 composer
C:\bin>php -r "eval('?>'.file_get_contents(' https://getcomposer.org/installer '));" C:\bin>php -r "eval('?>'.file_get_contents(' https://getcomposer.org/installer '));"

He called through С:/xamppp/php/php composer.phar他通过С:/xamppp/php/php composer.phar调用

When I run project Dependencies are not tightened(yii,...)当我运行项目时,依赖关系没有收紧(yii,...)

when I С:/xamppp/php/php composer.phar create project C:/...htdocs/mysite/当我С:/xamppp/php/php composer.phar 创建项目 C:/...htdocs/mysite/

Error:InvalidArgumentExeption Cannot find project with stability stable错误:InvalidArgumentExeption找不到稳定稳定的项目

My answer may not be relevant to OP question for anyone looking to install composer对于任何想要安装 Composer 的人,我的回答可能与 OP 问题无关

Linux - Ubuntu Linux - Ubuntu

sudo apt-get install composer

Or ..或者 ..

Manual installation based on getcomposer.org基于 getcomposer.org 手动安装

#!/usr/bin/env bash

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'e0012edf3e80b6978849f5eff0d4b4e4c79ff1609dd1e613307e16318854d24ae64f26d17af3ef0bf7cfb710ca74755a') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
php -r "unlink('composer-setup.php');"

run these command in a bash file or one by one.在 bash 文件中或一一运行这些命令。

Or ..或者 ..

# this answer is copied and not tested

curl -s http://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/

If I've read this correctly, are you trying to install yii?如果我没看错,您是否正在尝试安装 yii?

If so, this guide should help:如果是这样,本指南应该会有所帮助:

http://www.yiiframework.com/wiki/392/creating-yii-applications-with-composer/ http://www.yiiframework.com/wiki/392/creating-yii-applications-with-composer/

It has a link to a sample Github project too.它也有一个指向示例 Github 项目的链接。

Get latest stable version of composer获取最新的稳定版作曲家

wget https://getcomposer.org/download/latest-stable/composer.phar

Move to bin移动到垃圾箱

sudo mv composer.phar /usr/bin/composer

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM