SULU CMS installation errors with Laravel Homestead

六月ゝ 毕业季﹏ 提交于 2019-12-12 04:30:54

问题


Follow this document http://docs.sulu.io/en/latest/book/getting-started.html at the end of installation process I got this error:

Target: cache

cache:clear  ({"--no-optional-warmers":true,"--no-debug":true,"--no-interaction":true})


             // Clearing the admin cache for the dev environment with debug true                                            



      [Symfony\Component\Filesystem\Exception\IOException]                                  
      Failed to remove directory "/home/vagrant/Code/sulu/var/cache/admin/de~/doctrine": .  


    sulu:build [-D|--nodeps] [--destroy] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-s|--shell] [--process-isolation] [-e|--env ENV] [--no-debug] [--] <command> [<target>]

Before that I was trying to set up file permissions with this:

HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\  -f1`
sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var/cache var/logs var/uploads var/uploads/* web/uploads web/uploads/* var/indexes var/sessions
sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var/cache var/logs var/uploads var/uploads/* web/uploads web/uploads/* var/indexes var/sessions

and also had these errors:

setfacl: web/uploads: Operation not supported
setfacl: web/uploads/media: Operation not supported
setfacl: web/uploads/media: Operation not supported

My host OS : Ubuntu 16.04 Vagrant : v.1.9.3 VirtualBox : v.5 Homestead: v.5.2.1

Does anyone have successful installation Sulu CMS with Homestead? What is the option to solve these my issues? Sulu CMS looks very promising but unfortunately I could not install it locally still with many attempts.

UPDATE After comment of Daniel I've tried other way to install Sulu but again got error at the very end of installation: Executing builders ==================

Target: cache

cache:clear  ({"--no-optional-warmers":true,"--no-debug":true,"--no-interaction":true})


             // Clearing the admin cache for the dev environment with debug true                                            



      [Symfony\Component\Filesystem\Exception\IOException]                                     
      Failed to remove directory "/home/vagrant/Code/sulu/app/cache/admin/de~/annotations": .  

Opened test.app in browser I see this error: Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function getLocale() on null in /home/vagrant/Code/sulu/vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Twig/Content/ContentPathTwigExtension.php on line 70 Symfony\Component\Debug\Exception\FatalThrowableError: Call to a member function getLocale() on null in /home/vagrant/Code/sulu/vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Twig/Content/ContentPathTwigExtension.php on line 70

Tried to delete cache folders manually - the same error. All console commands work fine. Any ideas?

P.S. I have a good experience of installation other Symfony-based applications under Homestead and all went smooth basically (Sylius, eZ etc.). So I am very surprised....


回答1:


To get around this, you need to remove this folder from the host machine, because it's an artifact from the previous process of trying to set things up and it's in god-mode, created by a no-longer existing almighty entity.

  • vagrant destroy (needed to release filesystem locks)
  • Remove folder on host: rm -rf .../sulu/app/cache/admin
  • type: nfs on folder binding
  • vagrant up

Should work then, encountered this same problem recently.

If you're using Homestead Improved, use the built-in "sulu" project type for a decent Nginx auto-setup:

sites:
    - map: homestead.app
      to: /home/vagrant/Code/Project/web
      type: sulu


来源:https://stackoverflow.com/questions/43829144/sulu-cms-installation-errors-with-laravel-homestead

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