无法打开流:霍姆斯特德环境上没有此类文件或目录



我正在使用Homestead环境和Commmand Line" PHP Artisan -V"它不起作用。我用" Laravel New Test"创建了我的项目。.我想认为我的所有文件都已更新。

vagrant@homestead:~/Laracasts/test$ php artisan -V
PHP Warning:  require(/home/vagrant/Laracasts/test/bootstrap/autoload.php):         
failed to open stream: No such file or directory in         
/home/vagrant/Laracasts/test/artisan on line 16
Warning: require(/home/vagrant/Laracasts/test/bootstrap/autoload.php):     
failed to open stream: No such file or directory in 
/home/vagrant/Laracasts/test/artisan on line 16
PHP Fatal error:  require(): Failed opening required 
'/home/vagrant/Laracasts/test/bootstrap/autoload.php' 
(include_path='.:/usr/share/php') in /home/vagrant/Laracasts/test/artisan on 
line 16
Fatal error: require(): Failed opening required 
'/home/vagrant/Laracasts/test/bootstrap/autoload.php' 
(include_path='.:/usr/share/php') in /home/vagrant/Laracasts/test/artisan on 
line 16
vagrant@homestead:~/Laracasts/test$

.yaml文件


ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Desktop/Arnau/dev/repositories/phpmyadmin
  to: /home/vagrant/phpmyadmin
- map: ~/Desktop/Arnau/dev/repositories/Laravel
  to: /home/vagrant/Laravel
- map: ~/Desktop/Arnau/dev/repositories/Laracasts
  to: /home/vagrant/Laracasts
sites:
- map: phpmyadmin.app
  to: /home/vagrant/phpmyadmin
- map: administracio.dev
  to: /home/vagrant/Laravel/administracio/public
- map: laracasts.dev
  to: /home/vagrant/Laravel/laracasts/public
databases:
- phpmyadmin
- administracio
- laracasts

和..甚至我在末尾添加的主机文件。

192.168.10.10 administracio.dev
192.168.10.10 laracasts.dev

php composer.phar安装之后的下一个错误

vagrant@homestead:~/Laracasts/test$ php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating optimized autoload files
> IlluminateFoundationComposerScripts::postInstall
> php artisan optimize
PHP Warning:  require(/home/vagrant/Laracasts/test/bootstrap/autoload.php):     
failed to open stream: No such file or directory in     
/home/vagrant/Laracasts/test/artisan on line 16
Warning: require(/home/vagrant/Laracasts/test/bootstrap/autoload.php): 
failed to open stream: No such file or directory in 
/home/vagrant/Laracasts/test/artisan on line 16
PHP Fatal error:  require(): Failed opening required 
'/home/vagrant/Laracasts/test/bootstrap/autoload.php' 
(include_path='.:/usr/share/php') in /home/vagrant/Laracasts/test/artisan on 
line 16
Fatal error: require(): Failed opening required     
'/home/vagrant/Laracasts/test/bootstrap/autoload.php' 
(include_path='.:/usr/share/php') in /home/vagrant/Laracasts/test/artisan on 
line 16
Script php artisan optimize handling the post-install-cmd event returned 
with error code 255
vagrant@homestead:~/Laracasts/test$

在进行了冗长的讨论和调试之后,问题变得清晰;bootstrap/autoload.php文件缺少。

解决此问题的解决方案是插入本应存在的代码(在Bootstrap/autoLoad.php中找到(。

文件最终尚不清楚。

相关内容

  • 没有找到相关文章

最新更新