[英]Unable to install laravel on bitnami wamp
I am totally new to laravel. 我对laravel完全陌生。 I would like to use it in my project
我想在我的项目中使用它
I downloaded WAMP Stack 7.1.26-2 from http://bitnami.com and to my surprise,it already came with laravel pre-installed. 我从http://bitnami.com下载了WAMP Stack 7.1.26-2,令我惊讶的是,它已经预装了laravel。
It is in the frameworks
folder as in: C:\\Bitnami\\wampstack-7.1.26-2\\frameworks
它位于
frameworks
文件夹中,如下所示: C:\\Bitnami\\wampstack-7.1.26-2\\frameworks
But my problem is that I do not kinow how to use laravel from there.It is not in the htdocs
folder as I think it s supposed to be. 但是我的问题是我不知道如何从那里使用laravel,它不在
htdocs
文件夹中,正如我认为的那样。
If I go to http://localhost I see only the bitnami welcome page 如果我访问http:// localhost,则只会看到bitnami欢迎页面
If i go to http://localhost/laravel ,it says PAGE NOT FOUND 如果我去http:// localhost / laravel ,它说页面未找到
I searched online for the answer but most of the time,it points me to this link: https://docs.bitnami.com/google/apps/#laravel 我在网上搜索了答案,但大多数时候,它都指向此链接: https : //docs.bitnami.com/google/apps/#laravel
But on that page, I see NOTHING relating to laravel.I cannot even find the word 'laravel' with a browser search. 但是在那一页上,我没有看到与laravel有关的东西,甚至在浏览器搜索中都找不到``laravel''这个词。
If I run composer create-project laravel/laravel myproject --prefer-dist
, I get this: 如果我运行
composer create-project laravel/laravel myproject --prefer-dist
, composer create-project laravel/laravel myproject --prefer-dist
得到以下信息:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\o.o amoo>composer create-project laravel/laravel myproject --prefer-dist
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/Bitnami/wampstack-
7.0.0RC7-/php/ext\php_solr.dll' - The specified module could not be found.
in Unknown on line 0
Installing laravel/laravel (v5.5.28)
- Installing laravel/laravel (v5.5.28): Loading from cache
Created project in myproject
> @php -r "file_exists('.env') || copy('.env.example', '.env');"
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/Bitnami/wampstack-
7.0.0RC7-/php/ext\php_solr.dll' - The specified module could not be found.
in Unknown on line 0
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 73 installs, 0 updates, 0 removals
- Installing symfony/thanks (v1.1.0): Loading from cache
- Installing symfony/polyfill-ctype (v1.10.0): Loading from cache
Invalid zip file, retrying...
- Installing symfony/polyfill-ctype (v1.10.0): Loading from cache
Invalid zip file, retrying...
- Installing symfony/polyfill-ctype (v1.10.0): Loading from cache
Failed to download symfony/polyfill-ctype from dist: 'C:\Users\o.o amoo\
myproject\vendor/symfony/polyfill-ctype/4199a310f6ba3768faedee6d521ec615' is not a zi
p archive.
Now trying to download from source
- Installing symfony/polyfill-ctype (v1.10.0): Cloning e3d8262452
[RuntimeException]
Failed to clone https://github.com/symfony/polyfill-ctype.git via https, ssh p
rotocols, aborting.
- https://github.com/symfony/polyfill-ctype.git
Cloning into 'C:\Users\o.o amoo\myproject\vendor\symfony\polyfill-ctype'...
fatal: unable to access 'https://github.com/symfony/polyfill-ctype.git/': Fa
iled to connect to github.com port 443: Timed out
- git@github.com:symfony/polyfill-ctype.git
Cloning into 'C:\Users\o.o amoo\myproject\vendor\symfony\polyfill-ctype'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
create-project [-s|--stability STABILITY] [--prefer-source] [--prefer-dist] [--r
epository REPOSITORY] [--repository-url REPOSITORY-URL] [--dev] [--no-dev] [--no
-custom-installers] [--no-scripts] [--no-progress] [--no-secure-http] [--keep-vc
s] [--remove-vcs] [--no-install] [--ignore-platform-reqs] [--] [<package>] [<dir
ectory>] [<version>]
C:\Users\o.o amoo>
That made me soo confused.It did make a project called myproject
was made in : C:\\Users\\oo amoo> but laravel couldn't be installed??? 这让我感到困惑。它确实使一个名为
myproject
的项目在以下位置创建:C:\\ Users \\ oo amoo>但无法安装laravel ????
If I try php artisan serve
I get: 如果我尝试
php artisan serve
我会得到:
Could not open input file:artisan
So with that,can I access myproject
with laarvel if so,how?If not how come and what do I do? 因此,如果可以,我可以使用laarvel访问
myproject
吗?如果不可以,我该怎么办?
Someone please point me in the right direction... 有人请指出正确的方向...
Thanks!!! 谢谢!!!
Alright let's start with why your project is installed in C:/Users it's because you use --prefer-dist in composer create-project laravel/laravel myproject --prefer-dist
. 好吧,让我们从为什么在C:/ Users中安装项目开始,这是因为您在
composer create-project laravel/laravel myproject --prefer-dist
。
--prefer-dist: Reverse of --prefer-source, composer will install from dist if possible.
--prefer-dist:与--prefer-source相反,如果可能,composer将从dist安装。 This can speed up installs substantially on build servers and other use cases where you typically do not run updates of the vendors.
这可以大大加快构建服务器和其他通常不运行供应商更新的用例的安装速度。 It is also a way to circumvent problems with git if you do not have a proper setup.
如果您没有正确的设置,它也是一种避免git问题的方法。
Second you run into errors maybe because you are in a directory that require additional rights, at least that's how it looks to me. 其次,您可能会遇到错误,可能是因为您位于需要其他权限的目录中,至少对我而言是如此。
If you have installed Laravel correctly you should be able to navigate trough a terminal to the desired location, and either use laravel new
BUT only if you are already in the directory that you want say C:/Code/myproject
if you are still in C/Code
you need to do laravel new myproject
如果您已经正确安装了Laravel,则应该能够通过终端导航到所需的位置,并且仅当您已经位于要说出
C:/Code/myproject
的目录中时,才可以使用laravel new
BUT(如果您仍在C/Code
你需要做laravel new myproject
If this doesn't work for you I would suggest you to verify that you installed everything according to the docs 如果这对您不起作用,我建议您根据文档检查是否已安装所有内容
And last but most important I want to mention 1 more thing for you, in Laravel it is really more convinient to use Homestead
. 最后但最重要的一点是,我想为您再说一件事,在Laravel中使用
Homestead
确实更方便。 You can read more for what is Homestead, how to install, configure and work with it here : https://laravel.com/docs/5.8/homestead 您可以在这里了解更多关于Homestead的信息,以及如何安装,配置和使用它: https : //laravel.com/docs/5.8/homestead
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.