wangyoucao577/go-release-action

pkg-config: exec: "pkg-config": executable file not found in $PATH

sberk42 opened this issue · 4 comments

hi,

I'm trying to get a build working that requires gousb, which needs to be build, the build is triggered but fails with:
go: downloading github.com/google/gousb v1.1.2
go build github.com/google/gousb:

pkg-config --cflags -- libusb-1.0

pkg-config: exec: "pkg-config": executable file not found in $PATH

I checked /usr/bin/pkg-config is in the image and libusb-1.0 installed - any idea how to make go build work?

Would you please share your full usage as well as the logs? It should be work if everything is available.

Oh, you need to run the apt via pre_command of this action, something like: pre_command: apt-get install -y libusb-1.0 libusb-1.0-0-dev. The whole building process is inside container, so install them on runner won't be helpful.
BTW, pkg-config needed to be installed inside container as well.

thanks for the hint - with the pre_command the build worked