2014-06-16 71 views
2

我試圖安裝gozmq與通常去拿安裝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是什麼,爲什麼我需要它?我該如何安裝它?

我試過釀安裝pkg配置,但它沒有工作,把它扔到了我下面的錯誤:

# 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的問題等

回答

5

您需要安裝這些庫的開發版本。

$ 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

+0

它zeromq不libzmq,是我不好。 – OneOfOne

+0

我想我成功安裝了它?但它拋出我'#github.com/alecthomas/gozmq 37:錯誤:使用未聲明的標識符'ZMQ_SWAP' 37:錯誤:使用未聲明的標識符'ZMQ_RECOVERY_IVL_MSEC' 37:錯誤:使用未聲明的標識符'ZMQ_MCAST_LOOP' 38:錯誤:使用未聲明的標識符'ZMQ_HWM''是否正常?我應該擔心嗎?我如何測試它是否確實安裝? –

+1

這似乎是程序包本身的錯誤,請在他們的github問題跟蹤器上報告。 – OneOfOne