Steps to reproduce:
- configure --enable-agent2 ...
- make
- make install DESTDIR=/some/staging/path
Result:
**
{{ go install -mod vendor -ldflags="-X zabbix.com/pkg/version.titleMessage=zabbix_agent2 -X 'zabbix.com/pkg/version.compileDate=`date +"%b %_d %Y"`' -X zabbix.com/pkg/version.compileTime=`date +%H:%M:%S` -X zabbix.com/pkg/version.compileOs=`go env GOOS` -X zabbix.com/pkg/version.compileArch=`go env GOARCH` -X main.confDefault=/usr/local/etc/zabbix_agent2.conf" zabbix.com/cmd/zabbix_agent2 go install -mod vendor -ldflags="-X zabbix.com/pkg/version.titleMessage=zabbix_agent2 -X 'zabbix.com/pkg/version.compileDate=`date +"%b %_d %Y"`' -X zabbix.com/pkg/version.compileTime=`date +%H:%M:%S` -X zabbix.com/pkg/version.compileOs=`go env GOOS` -X zabbix.com/pkg/version.compileArch=`go env GOARCH` -X main.confDefault=/usr/local/etc/zabbix_agent2.conf" zabbix.com/cmd/zabbix_agent2go install zabbix.com/cmd/zabbix_agent2: open /usr/local/sbin/zabbix_agent2: permission denied}}
Expected:
Install zabbix_agent2 as ${DESTDIR}/usr/local/sbin/zabbix_agent2 (for packaging, and like zabbix_agent, zabbix_proxy, etc...)