I wrote a go package that is just a wrapper for a C program, which requires openssl
to work.
My CGO setup is as follow:
// #cgo CFLAGS: -Imy/library/include -Imy/library/src -I/usr/local/opt/openssl/include
// #cgo LDFLAGS: -L/usr/include/openssl -Lmy/library/src -lcrypto
// #include <my_library.c>
// #include <stdlib.h>
import "C"
I can compile and run it both in my Mac and on a Docker container I created, but when I try to run (it is already compiled) on a different machine I get the error:
error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory
How can I make it work also on PCs without libssl-dev
installed?