我正在尝试在 ubuntu 16.04 上安装 libmodbus。
我按照本页中的说明进行操作。 https://libmodbus.org/download/
当我运行命令时出现以下错误
命令:./configure && make && make install;
错误:
Making install in src
/bin/mkdir -p '/usr/local/lib'
/bin/bash ../libtool --mode=install /usr/bin/install -c libmodbus.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libmodbus.so.5.1.0 /usr/local/lib/libmodbus.so.5.1.0
/usr/bin/install: cannot create regular file '/usr/local/lib/libmodbus.so.5.1.0': Permission denied
Makefile:414: recipe for target 'install-libLTLIBRARIES' failed
make[2]: *** [install-libLTLIBRARIES] Error 1
Makefile:617: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
Makefile:499: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
如何解决此错误?