I’m getting this error while installing pact-go li...
# pact-go
z
I’m getting this error while installing pact-go libs in the CI pipeline
Copy code
Your Pact library installation is out of date and we were unable to download a newer one for you: open /usr/local/lib/libpact_ffi.so: permission denied
Using this command in makefile:
pact-go -l DEBUG install
Even tried
PACT_FFI_INSTALL_DIR=/tmp/pact-lib pact-go -l DEBUG
install but didn’t help. Any pointers on how to fix it?
Sorted after a lot of debugging. Added sudo and chmod!
m
Could we improve the install error somehow?
There is a log level flag on the install command
The debug should print out any problems and it should exit with nonzero status of it couldn't install it
y
Yeah, I think if we get a perm denied error, we can advise the user use sudo or to write in a user writable location
b
I got the same error executing the pact-go -l DEBUG install, I'll try with sudo...
Copy code
2024/01/16 19:39:38 [INFO] package libpact_ffi not found
2024/01/16 19:39:38 [INFO] downloading library from <https://github.com/pact-foundation/pact-reference/releases/download/libpact_ffi-v0.4.5/libpact_ffi-linux-x86_64.so.gz> to /usr/local/lib/libpact_ffi.so
2024/01/16 19:39:41 [ERROR] Your Pact library installation is out of date and we were unable to download a newer one for you: open /usr/local/lib/libpact_ffi.so: permission denied
m
you can also override the install location. The pact go build itself does this: https://github.com/pact-foundation/pact-go/blob/master/.github/workflows/test.yml#L11
👀 1