找不到稳定稳定的包 /laravel/laravel
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41349538/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Could not find package /laravel/laravel with stability stable
提问by Scarass
Could not find package /laravel/laravel with stability stable.
So I've got that error when I tried to create new laravel project with the following command:
因此,当我尝试使用以下命令创建新的 laravel 项目时,出现了该错误:
composer create-project --prefer-dist /laravel/laravel project
And if I try just laravel new project, I get: laravel: command not found
如果我只尝试 laravel 新项目,我会得到:laravel: command not found
However laravel is installed, and if I move to its installation folder (which is ~/.config/composer/vendor/laravel/installer), and I type:
但是,laravel 已安装,如果我移动到它的安装文件夹(即 ~/.config/composer/vendor/laravel/installer),我输入:
php laravel new project
Then it works but I get bunch of * suggests installing *. For example:
然后它就可以工作了,但我收到一堆 * 建议安装 *. 例如:
laravel/framework suggests installing symfony/psr-http-message-bridge (Required to use psr7 bridging features (0.2.*).)
symfony/routing suggests installing symfony/expression-language (For using expression matching)
psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
And many more.
还有很多。
I'm on Linux Mint Cinnamon 64-bit, and LAMP.
我使用的是 Linux Mint Cinnamon 64 位和 LAMP。
回答by maiorano84
Everything you need is covered in Laravel's extensive documentation.
Laravel 的大量文档涵盖了您需要的一切。
Via Composer Create-Project
Alternatively, you may also install Laravel by issuing the Composer create-project command in your terminal:
composer create-project --prefer-dist laravel/laravel blog
通过 Composer 创建项目
或者,您也可以通过在终端中发出 Composer create-project 命令来安装 Laravel:
composer create-project --prefer-dist laravel/laravel blog
Note that there is no preceding slash in laravel/laravel
.
请注意, 中没有前面的斜线laravel/laravel
。
For the installer to work, again you can refer to the documentation:
对于安装程序的工作,您可以再次参考文档:
Via Laravel Installer
First, download the Laravel installer using Composer:
composer global require "laravel/installer"
Make sure to place the$HOME/.composer/vendor/bin directory
(or the equivalent directory for your OS) in your $PATH so the laravel executable can be located by your system.Once installed, the laravel new command will create a fresh Laravel installation in the directory you specify. For instance, laravel new blog will create a directory named blog containing a fresh Laravel installation with all of Laravel's dependencies already installed:
laravel new blog
通过 Laravel 安装程序
首先,使用 Composer 下载 Laravel 安装程序:
composer global require "laravel/installer"
确保将$HOME/.composer/vendor/bin directory
(或您操作系统的等效目录)放在您的 $PATH 中,以便您的系统可以找到 laravel 可执行文件。安装后,laravel new 命令将在您指定的目录中创建一个全新的 Laravel 安装。例如,laravel new blog 将创建一个名为 blog 的目录,其中包含一个全新的 Laravel 安装,并且已经安装了所有 Laravel 的依赖项:
laravel new blog
You can read more about changing your $PATH variable here
您可以在此处阅读有关更改 $PATH 变量的更多信息