无法使用dev_appserver.py在mac上运行本地开发服务器


unable to use dev_appserver.py to run the local development server on mac

我按照Google云平台上的教程运行hello-world应用程序的本地服务器,并使用dev_appserver.py命令,然而,终端报怨消息如下:

$ dev_appserver.py .
INFO     2016-10-22 21:59:53,084 devappserver2.py:769] Skipping SDK update check.
INFO     2016-10-22 21:59:53,129 api_server.py:205] Starting API server at: http://localhost:56857
INFO     2016-10-22 21:59:53,133 dispatcher.py:197] Starting module "default" running at: http://localhost:8080
INFO     2016-10-22 21:59:53,137 admin_server.py:116] Starting admin server at: http://localhost:8000
ERROR    2016-10-22 21:59:54,141 php_runtime.py:348] The PHP runtime is not available
Traceback (most recent call last):
  File "/Users/Dale/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 344, in new_instance
    self._check_binaries(php_executable_path, gae_extension_path)
  File "/Users/Dale/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/php_runtime.py", line 265, in _check_binaries
    raise _PHPBinaryError('The development server must be started with the '
_PHPBinaryError: The development server must be started with the --php_executable_path flag set to the path of the php-cgi binary.

抱怨是什么意思?php_runtime.py有什么问题吗?我怎么才能纠正呢?非常感谢。

如果你在Mac上,你需要运行这个命令:

安装app-engine-php-darwin

如果您在Linux上,您需要提供——php_executable_path作为错误消息的状态。