ErrorException chdir(): No such file or directory (errno 2) when trying to create a laravel project

耗尽温柔 提交于 2020-12-27 07:19:14

问题


When I try to create a new Laravel project I get this error:

c:\xampp\htdocs>composer create-project --prefer-dist laravel/laravel blog
Creating a "laravel/laravel" project at "./blog"
Installing laravel/laravel (v8.4.0)
  - Installing laravel/laravel (v8.4.0): Extracting archive
Created project in C:\xampp\htdocs\blog


  [ErrorException]
  chdir(): No such file or directory (errno 2)

I'm using XAMPP by the way.


回答1:


Please try this:

composer self-update



回答2:


In window

When you install composer, please choose the option "for only me".(for administrative purpose). don't choose the option "all users". if you choose the option "all users", you will get the installation error that is "chdir():No

Such file or directory, errno 2" when you install laravel through composer (command from

laravel offical documentation,"composer create-project --prefer-dist laravel/laravel blog").



来源:https://stackoverflow.com/questions/64723171/errorexception-chdir-no-such-file-or-directory-errno-2-when-trying-to-creat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!