无法在bitnami wamp上安装laravel

问题描述 投票:0回答:1

我对laravel完全不熟悉。我想在我的项目中使用它

我从http://bitnami.com下载了WAMP Stack 7.1.26-2,令我惊讶的是,它已经预装了laravel。

它位于frameworks文件夹中,如:C:\Bitnami\wampstack-7.1.26-2\frameworks

但我的问题是我不知道如何从那里使用laravel。它不在我认为应该是的htdocs文件夹中。

如果我去http://localhost我只看到bitnami欢迎页面

如果我去http://localhost/laravel,它说PAGE NOT FOUND

我在网上搜索答案,但大部分时间,它指向我链接:https://docs.bitnami.com/google/apps/#laravel

但是在那个页面上,我看到没有关于laravel的内容。我甚至无法通过浏览器搜索找到“laravel”这个词。

如果我运行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


  - [email protected]: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>

这让我很困惑。它确实做了一个名为myproject的项目是在:C:\ Users \ o.o amoo>但laravel无法安装???

如果我尝试php artisan serve我得到:

Could not open input file:artisan

那么,如果是这样的话,我可以用laravel访问myproject,怎么样?如果不是怎么样,我该怎么办?

有人请指出我正确的方向......

谢谢!!!

php laravel wamp bitnami
1个回答
0
投票

好吧,让我们开始说明为什么你的项目安装在C:/ Users中,因为你在composer create-project laravel/laravel myproject --prefer-dist中使用了--prefer-dist。

--prefer-dist:反向--prefer-source,如果可能的话,composer将从dist安装。这可以大大加快构建服务器和其他通常不运行供应商更新的用例的安装速度。如果您没有正确的设置,它也是一种解决git问题的方法。

其次你遇到错误可能是因为你在一个需要额外权限的目录中,至少这是我看起来的样子。

如果你已经正确安装了Laravel,你应该能够通过终端导航到所需的位置,并且只有当你已经在你想要的目录中时才使用laravel new但是如果你仍然在C:/Code/myproject你需要做C/Code

如果这对您不起作用,我建议您根据文档验证是否安装了所有内容

最后但最重要的是我想再提一件事,在Laravel中使用laravel new myproject真的更方便。您可以在这里阅读更多有关Homestead的内容,如何安装,配置和使用它:Homestead

© www.soinside.com 2019 - 2024. All rights reserved.