我试图用通常的go get:
安装gozmqgo get github.com/alecthomas/gozmq
但是,我遇到以下错误:
# pkg-config --cflags libzmq libzmq libzmq libzmq
exec: "pkg-config": executable file not found in $PATH
我真的不明白这个错误意味着什么。这是否意味着它试图运行命令# pkg-config --cflags libzmq libzmq libzmq libzmq
并且失败,因为pkg-config
不在$ PATH上?什么是pkg-config
,为什么我需要它?我该如何安装?
我尝试brew安装pkg-config但它没有工作,它给我发了以下错误:
# pkg-config --cflags libzmq libzmq libzmq libzmq
Package libzmq was not found in the pkg-config search path.
Perhaps you should add the directory containing `libzmq.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libzmq' found
Package libzmq was not found in the pkg-config search path.
Perhaps you should add the directory containing `libzmq.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libzmq' found
Package libzmq was not found in the pkg-config search path.
Perhaps you should add the directory containing `libzmq.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libzmq' found
Package libzmq was not found in the pkg-config search path.
Perhaps you should add the directory containing `libzmq.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libzmq' found
exit status 1
不确定为什么会这样。
编辑:
正如第一个回答者建议的那样,我做了:
brew install --devel zeromq
然而,在go get github.com/alecthomas/gozmq
之后我收到以下错误
错误:
# github.com/alecthomas/gozmq
37: error: use of undeclared identifier 'ZMQ_SWAP'
37: error: use of undeclared identifier 'ZMQ_RECOVERY_IVL_MSEC'
37: error: use of undeclared identifier 'ZMQ_MCAST_LOOP'
38: error: use of undeclared identifier 'ZMQ_HWM'
似乎"正常"去错误/警告。但他们来自我上网的图书馆。我不知道该怎么办,我是否应该自己解决这些问题,或者我应该如何解决它,或者通过电子邮件发送原始开发者/社区或git问题等。