ubuntu - HHVM 已安装,但根据 error.log,环境中缺少类型检查器

标签 ubuntu nginx ubuntu-14.04 hhvm hacklang

我从文件中的以下内容开始:

<?php phpinfo();

它输出以下内容:
HHVM Version 3.12.1
...etc...

我将文件更改为:
<?hh phpinfo();

我收到服务器错误 500 响应,然后检查/var/log/hhvm/error.log 中的 hhvm 日志:
Fatal error: /path/to/my/file.php appears to be a Hack file, but you do not appear
to be running the Hack typechecker. See the documentation at 
http://docs.hhvm.com/hack/typechecker/setup for information on getting it running.
You can also set `-d hhvm.hack.lang.look_for_typechecker=0` to disable this check
(not recommended).

错误消息中提供的文档链接将我带到假定类型检查器已安装的页面。但是,它提供了安装类型检查器的链接。单击该链接告诉我:
There are two ways to get the typechecker: automatically when you install HHVM or
by compiling it.

啊,但我确实安装了 HHVM,这就是我得到上面显示的第一个输出的方式:
HHVM Version 3.12.1
...etc...

此外,文档说明了这一点:
The typechecker client is generally installed at /usr/bin/hh_client while the
typechecker server is generally installed at /usr/bin/hh_server.

这是我在运行 时看到的$ ls -la/usr/bin/hh_client/usr/bin/hh_server
-rwxr-xr-x 1 root root 3689005 Feb 29 22:07 /usr/bin/hh_client
-rwxr-xr-x 1 root root 3876085 Feb 29 22:07 /usr/bin/hh_server

从所有迹象来看,类型检查器看起来像是已安装!

这是我在 Ubuntu 14.04 上安装它的方法:
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
sudo add-apt-repository "deb http://dl.hhvm.com/ubuntu $(lsb_release -sc) main"
sudo apt-get update
sudo apt-get install hhvm
sudo update-rc.d hhvm defaults
sudo /usr/share/hhvm/install_fastcgi.sh

在/etc/hhvm/server.ini 里面我有这个:
;hhvm.server.port = 9000
hhvm.server.file_socket=/var/run/hhvm/hhvm.sock

我已确保在我的所有配置中都有以下内容:
fastcgi_pass unix:/var/run/hhvm/hhvm.sock;

我已经重新启动了所有服务器。

我已经在运行 Ubuntu 14.04 的两个不同系统上执行了整个过程(包括全新的 Ubuntu 14.04 最小安装),结果相同。

最佳答案

问题是您没有为类型检查设置代码,而不是没有安装类型检查器。根据错误发送给您的文档,您需要创建一个 .hhconfig 文件位于代码库的根目录。

关于ubuntu - HHVM 已安装,但根据 error.log,环境中缺少类型检查器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36061486/

相关文章:

ubuntu - 这些错误在 riak 安装中意味着什么?

apache - Lighttpd 与 Nginx

c++ - Box2D:导致 "Polygon is degenerate"的三角形

java -/conf 目录在 Hadoop 2.5.1 中丢失错误

Ubuntu安装卡在vmware tools安装

ruby-on-rails - `require' : no such file to load -- mkmf (LoadError)

ubuntu - 在 Ubuntu16.04 上使用 systemD 时 DotnetCore 内容根路径发生变化

nginx docker 容器无法读取 certbot 证书

json - 对 NGINX 服务器上托管的 Node.js Express 服务器的 cURL POST 请求返回 502 错误

ubuntu-14.04 - 没有目录,使用 HOME=/登录