Download the tarball of the version you want and run
./configure; make; make install; to compile and
install libmodbus on your system.
Two versions of libmodbus are currently maintained:
The latest stable release is also available in many Linux distributions:
You can also browse the source code on stephane/libmodbus or clone with the command:
$ git clone git://github.com/stephane/libmodbusto compile and test the latest version.