是的,可以在 Dusk 的 github 页面上找到。这是一个已知问题,他们正在努力更新下一个宅基地框。
基本问题是宅基地盒子没有可视化界面,
that dusk 运行真正的浏览器,所以你必须安装 chromedriver
如果你想使用它。
但现在这对我有用:https://github.com/laravel/dusk/issues/50#issuecomment-275155974 https://github.com/laravel/dusk/issues/50#issuecomment-275155974
未包含在该帖子中,但对我来说是必要的:
确保您具有以下权限集cd vendor/laravel/dusk/bin; chmod 775 *
github 帖子中的步骤:
首先,需要在来宾操作系统中安装 google-chrome:
$ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
$ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
$ sudo apt-get update && sudo apt-get install -y google-chrome-stable
接下来是 xvfb:
$ sudo apt-get install -y xvfb
尝试开始./vendor/laravel/dusk/bin/chromedriver-linux --port=8888.
如果您在加载库(libnss3.so、libgconf-2.so.4)时遇到一些错误,请尝试以下操作:
$ sudo apt-get install -y libnss3-dev libxi6 libgconf-2-4
当你看到
$ ./vendor/laravel/dusk/bin/chromedriver-linux --port=8888
Starting ChromeDriver 2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e) on port 8888
Only local connections are allowed.
this means ChromeDriver can be started (so SupportsChrome trait should be able to start it too). You can stop this process for now (Ctrl+C).
Run
$ Xvfb :0 -screen 0 1280x960x24 &
in a separate terminal window.
此外,您可能想在来宾的 /etc/hosts 文件中添加您的开发域:
127.0.0.1 域.dev。
这个问题是默认将chromedriver添加到homestead中,会
4月中旬解决。https://github.com/laravel/homestead/issues/516 https://github.com/laravel/homestead/issues/516