Need Assistance:error while loading shared libraries: libsyslog-ng-3.6.so.0
Hi, I am using syslog-ng-3.6.2 ( https://src.fedoraproject.org/lookaside/pkgs/syslog-ng/syslog-ng_3.6.2.tar.g... ). I want to use syslog-ng header files in my project. I am calling syslog-ng code from my Go code. I compiled my source code in my local system ( go build -v -x main.go) and created a binary called 'main'. My binary is running successfully on my local system. When I copy the binary ('main') in another Linux box and try to run it as './main' it is giving me the following error: ubuntu@ingest-0693b91d:~$ ./main ./main: error while loading shared libraries: libsyslog-ng-3.6.so.0: cannot open shared object file: No such file or directory I have syslog-ng-3.6.2 shared files in the following location '/home/ubuntu/test/syslog/syslog-ng-3.6.2/install/lib/syslog-ng' and I have set LD_LIBRARY_PATH to {prefix}/lib/syslog-ng Can someone please guide me, why is it giving such error ? Thanks, Nitish
Hi, On Mon, Jun 10, 2019 at 07:36:44PM +0530, Nitish Saboo wrote:
I want to use syslog-ng header files in my project. I am calling syslog-ng code from my Go code.
Are you using cgo? If yes, did you use the correct `// #include` and `LDFLAGS` in your go source code?
participants (2)
-
Fabien Wernli
-
Nitish Saboo