使用说明:
法1 ubuntu package
sudo apt-get install libmodbus-dev
sudo apt-get install libmodbus5
https://packages.ubuntu.com/search?keywords=libmodbus
法2 源码安装
下载地址:https://github.com/stephane/libmodbus/releases
配置前的准备:
sudo apt-get install autoconf
sudo apt-get install automake
sudo apt-get install libtool
开始配置:
-
step1:在代码目录下运行
./autogen.sh
-
step2:执行
sudo ./configure && make install
libmodbus 3.1.6 =============== prefix: /usr/local sysconfdir: ${prefix}/etc libdir: ${exec_prefix}/lib includedir: ${prefix}/include compiler: gcc cflags: -g -O2 ldflags: documentation: no tests: yes