您好我正在尝试在linux机器上安装zmq模块。下面是我遵循的步骤
• Make sure you have the following packages installed (sudo apt-get install binutils libtool autoconf automake)
• Get the latest POSIX tarball (http://zeromq.org/intro:get-the-software) and untar it
• Run configure (./configure)
• Run make (sudo make install)
• npm install zmq or npm update if you already have it listed in your package.json
• sudo ldconfig (otherwise you might get the error "connot open shared object file")
但是当我运行上述步骤时,我收到如下错误
Error: libzmq.so.3: cannot open shared object file: No such file or directory
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/var/MLIDeployment/MLI/zeromq-4.0.3/node_modules/zmq/lib/index.js:8:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
我被困在这里任何有关这方面的帮助都会有所帮助
答案 0 :(得分:3)
您遇到的错误是无法找到libzmq.so
。
您需要将安装目录(默认为/usr/local/lib
)添加到LD_PATH。
要添加它,您需要执行:
sudo echo "/usr/local/lib" >> /etc/ld.so.conf.d/local-lib.conf
sudo ldconfig
希望这有效。