作者热门文章
- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我试图用通常的 go get 安装 gozmq:
go 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'
似乎是“正常”的错误/警告。但它们来 self 上网的图书馆。我不确定该怎么做,如果我应该自己修复它们或者我应该如何解决它或通过电子邮件发送原始开发人员/社区或 git 问题等。
最佳答案
您需要安装这些库的开发版本。
$ brew install --devel zeromq
根据 issue 98 ,如果您使用的是 zeromq v3.x
,则需要使用:
go get -tags zmq_3_x github.com/alecthomas/gozmq
# or if you're using 4x
go get -tags zmq_4_x github.com/alecthomas/gozmq
检查 README .
关于go - 使用 go get 安装 gozmq 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24250838/
我试图用通常的 go get 安装 gozmq: go get github.com/alecthomas/gozmq 但是,我遇到了以下错误: # pkg-config --cflags libzm
我是一名优秀的程序员,十分优秀!