0

我正在尝试建立Kong的开发环境。我在我的机器上安装了 Kong & cassandra 并且能够运行 Kong Fine。我在尝试设置开发环境时遇到问题。

首先,我尝试了这里提到的 Source Install 。

问题1

在克隆 Kong github repo 的目录中执行sudo make install给了我以下消息:-

Use --force to force removal (warning: this may break modules).
Failed removing.
Updating manifest for /usr/local/lib/luarocks/rocks
kong 0.4.2-1 is now built and installed in /usr/local (license: MIT)

之后执行sudo make dev失败并出现以下错误:-

bin/kong config -c kong.yml -e TEST
lua: bin/kong:13: module 'kong.cli.utils' not found:
    no field package.preload['kong.cli.utils']
    no file '/usr/local/share/lua/5.2/kong/cli/utils.lua'
    no file '/usr/local/share/lua/5.2/kong/cli/utils/init.lua'
    no file '/usr/local/lib/lua/5.2/kong/cli/utils.lua'
    no file '/usr/local/lib/lua/5.2/kong/cli/utils/init.lua'
    no file './kong/cli/utils.lua'
    no file '/usr/share/lua/5.2/kong/cli/utils.lua'
    no file '/usr/share/lua/5.2/kong/cli/utils/init.lua'
    no file './kong/cli/utils.lua'
    no file '/usr/local/lib/lua/5.2/kong/cli/utils.so'
    no file '/usr/lib/x86_64-linux-gnu/lua/5.2/kong/cli/utils.so'
    no file '/usr/lib/lua/5.2/kong/cli/utils.so'
    no file '/usr/local/lib/lua/5.2/loadall.so'
    no file './kong/cli/utils.so'
    no file '/usr/local/lib/lua/5.2/kong.so'
    no file '/usr/lib/x86_64-linux-gnu/lua/5.2/kong.so'
    no file '/usr/lib/lua/5.2/kong.so'
    no file '/usr/local/lib/lua/5.2/loadall.so'
    no file './kong.so'
stack traceback:
    [C]: in function 'require'
    bin/kong:13: in main chunk
    [C]: in ?
make: *** [dev] Error 1

然后我尝试了同样失败的 vagrant install 。

第 2 期

执行以下命令后:-

KONG_PATH=/home/j/code/github.com/kong vagrant up

我收到以下错误:-

There is a syntax error in the following Vagrantfile. The syntax error
message is reproduced below for convenience:

/home/j/code/github.com/kong-vagrant/Vagrantfile:17: syntax error, unexpected ':', expecting kEND
  config.vm.network :forwarded_port, guest: 8000, host: 8000
                                           ^
/home/j/code/github.com/kong-vagrant/Vagrantfile:18: syntax error, unexpected ':', expecting kEND
  config.vm.network :forwarded_port, guest: 8001, host: 8001
                                           ^
/home/j/code/github.com/kong-vagrant/Vagrantfile:20: syntax error, unexpected ':', expecting kEND

有人可以让我知道出了什么问题吗?

环境

  • 卢阿 - 5.2.0
  • Ubuntu 12.04 LTS - 64 位
4

1 回答 1

1
  • 问题 1 是因为我使用的是 Lua 5.2。Kong 仅支持此处提到的 Lua 5.1
  • 问题 2 是因为 Vagrant 版本。Kong-vagrant仅适用于 Vagrant 1.7 及更高版本。
于 2015-09-16T05:00:31.823 回答