0

在安装过程结束时按照此文档http://docs.sulu.io/en/latest/book/getting-started.html我收到此错误:

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>]

在此之前,我试图用这个设置文件权限:

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

并且还有这些错误:

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

我的主机操作系统:Ubuntu 16.04 Vagrant:v.1.9.3 VirtualBox:v.5 Homestead:v.5.2.1

有人用 Homestead 成功安装 Sulu CMS 吗?有什么办法可以解决我的这些问题?Sulu CMS 看起来很有前途,但不幸的是,经过多次尝试,我仍然无法在本地安装它。

更新 在丹尼尔评论之后,我尝试了其他方式来安装 Sulu,但在安装结束时再次出现错误: 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": .  

在浏览器中打开 test.app 我看到这个错误:致命错误:未捕获 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 第 70 行 Symfony\Component\Debug\Exception\FatalThrowableError: 在 /home/vagrant/Code/sulu/vendor 中调用 null 上的成员函数 getLocale() /sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Twig/Content/ContentPathTwigExtension.php 在第 70 行

试图手动删除缓存文件夹 - 同样的错误。所有控制台命令都可以正常工作。有任何想法吗?

PS 我在 Homestead 下安装其他基于 Symfony 的应用程序有很好的经验,并且基本上一切顺利(Sylius、eZ 等)。所以我很惊讶......

4

1 回答 1

0

要解决此问题,您需要从主机中删除此文件夹,因为它是先前尝试设置的过程中的工件,并且它处于上帝模式,由不再存在的全能实体创建。

  • vagrant destroy(需要释放文件系统锁)
  • 删除主机上的文件夹: rm -rf .../sulu/app/cache/admin
  • 类型:文件夹绑定上的 nfs
  • 流浪起来

那么应该可以工作,最近遇到了同样的问题。

如果您使用的是Homestead Improvement,请使用内置的“sulu”项目类型进行体面的 Nginx 自动设置:

sites:
    - map: homestead.app
      to: /home/vagrant/Code/Project/web
      type: sulu
于 2017-05-15T15:48:46.747 回答