-
Notifications
You must be signed in to change notification settings - Fork 0
/
kong
71 lines (53 loc) · 2.59 KB
/
kong
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
通过kong的官网教程(https://docs.konghq.com/install/macos/?_ga=2.19054008.1681988259.1563266621-859782909.1562910911)安装kong之后(mac安装),
会发现 curl -i http:https://localhost:8001/ 返回 curl: (52) Empty reply from server
但是通过lsof -i tcp:8001 或者telnet localhost 8001都能看到端口是开的。
可以通过下面的方式解决(downgrading pcre to 8.42):
$ brew edit pcre
# replace content with https://github.com/Homebrew/homebrew-core/blob/839adfb30f52a6e93d30d4fe2a8eb5f53f20dc4e/Formula/pcre.rb and save file
$ brew remove pcre
# Error: Refusing to uninstall /usr/local/Cellar/pcre/8.43
# because it is required by kong, luarocks, nginx, openresty and zsh, which are currently installed.
# You can override this and force removal with:
# brew uninstall --ignore-dependencies pcre
$ brew reinstall pcre -s
https://github.com/Homebrew/homebrew-core/blob/839adfb30f52a6e93d30d4fe2a8eb5f53f20dc4e/Formula/pcre.rb 的内容是 ,可以直接粘贴过去:
class Pcre < Formula
desc "Perl compatible regular expressions library"
homepage "https://www.pcre.org/"
url "https://ftp.pcre.org/pub/pcre/pcre-8.42.tar.bz2"
mirror "https://www.mirrorservice.org/sites/ftp.exim.org/pub/pcre/pcre-8.42.tar.bz2"
sha256 "2cd04b7c887808be030254e8d77de11d3fe9d4505c39d4b15d2664ffe8bf9301"
bottle do
cellar :any
sha256 "f848e72c9a6ddfdd4e57d25df859830187cbb8e850996b22a84270a6590f56ff" => :mojave
sha256 "b904c008c04003c3f40e30c6ee6a3b411aad81aa2f2684db9bf59bccd9d58b01" => :high_sierra
sha256 "d8f8faec67df2d86e12757cac6f076c48d0fafac8f2a88c87c64d5807dce7142" => :sierra
sha256 "b07b9523cbab3c86423fecc7f5e79a1eb9dd47958d915f8915c78e6faa4f4435" => :el_capitan
end
head do
url "svn:https://vcs.exim.org/pcre/code/trunk"
depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build
end
def install
system "./autogen.sh" if build.head?
system "./configure", "--disable-dependency-tracking",
"--prefix=#{prefix}",
"--enable-utf8",
"--enable-pcre8",
"--enable-pcre16",
"--enable-pcre32",
"--enable-unicode-properties",
"--enable-pcregrep-libz",
"--enable-pcregrep-libbz2",
"--enable-jit"
system "make"
ENV.deparallelize
system "make", "test"
system "make", "install"
end
test do
system "#{bin}/pcregrep", "regular expression", "#{prefix}/README"
end
end