在创建新的laravel项目时,如何解决以下错误?

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

我是一个新的家园和laravel,我试图安装家园和开始新的laravel项目,我按照以下链接的步骤。https:/www.youtube.comwatch?v=Il08--droNI我似乎成功地安装了homestead,然后我启动了vargant,并在我的homestead文件夹内使用以下命令composer global require laravelinstaller安装了laravel,现在我试图使用以下命令laravel new blog启动新项目,但它给我以下错误信息

Crafting application...
PHP Warning:  file_put_contents(/home/vagrant/code/laravel_816486aaffc1239c550dccbdbf28f281.zip): failed to open stream: Permission denied in /home/vagrant/.composer/vendor/laravel/installer/src/NewCommand.php on line 147

Warning: file_put_contents(/home/vagrant/code/laravel_816486aaffc1239c550dccbdbf28f281.zip): failed to open stream: Permission denied in /home/vagrant/.composer/vendor/laravel/installer/src/NewCommand.php on line 147
PHP Warning:  ZipArchive::extractTo(): Permission denied in /home/vagrant/.composer/vendor/laravel/installer/src/NewCommand.php on line 169

Warning: ZipArchive::extractTo(): Permission denied in /home/vagrant/.composer/vendor/laravel/installer/src/NewCommand.php on line 169
PHP Warning:  ZipArchive::close(): Invalid or uninitialized Zip object in /home/vagrant/.composer/vendor/laravel/installer/src/NewCommand.php on line 171

Warning: ZipArchive::close(): Invalid or uninitialized Zip object in /home/vagrant/.composer/vendor/laravel/installer/src/NewCommand.php on line 171
You should verify that the "storage" and "bootstrap/cache" directories are writable.

In Process.php line 332:

  The provided cwd "/home/vagrant/code/myproject" does not exist.


new [--dev] [--auth] [-f|--force] [--] [<name>]

vagrant@homestead:~/code$ ^C

这是我的.yaml文件

---
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox



folders:
    - map: C:\Users\hit-ham\laravel-apps
      to: /home/vagrant/code
      type: "nfs"

sites:
    - map: myproject.test
      to: /home/vagrant/code/myproject/public

databases:
    - homestead

features:
    - mariadb: false
    - ohmyzsh: false
    - webdriver: false

# ports:
#     - send: 50000
#       to: 5000
#     - send: 7777
#       to: 777
#       protocol: udp

我的Homestead文件夹在usermyname里。

编辑:我试图删除所有的东西,并安装新的窗口 ,并开始一切从头开始 ,安装vagrant ,虚拟盒子 ,作曲家,但我现在有新的错误。

Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for league/flysystem 1.0.67 -> satisfiable by league/flysystem[1.0.67].
    - league/flysystem 1.0.67 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
  Problem 2
    - league/flysystem 1.0.67 requires ext-fileinfo * -> the requested PHP extension fileinfo is missing from your system.
    - laravel/framework v7.6.2 requires league/flysystem ^1.0.8 -> satisfiable by league/flysystem[1.0.67].
    - Installation request for laravel/framework v7.6.2 -> satisfiable by laravel/framework[v7.6.2].

  To enable extensions, verify that they are enabled in your .ini files:
    - C:\php7\php.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

laravel homestead
1个回答
0
投票

在php.ini文件中,取消comment下面的内容 extension = fileinfo

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