go模块未正确下载动态库的cgo软链接

The environment is ubuntu 16.04 64bit, go version go1.12 linux/amd64

I am trying to switch my golang project from gopath to gomodule. One of the packages my project imported is using cgo to call ffmpeg, the package have several dynamic ffmpeg libraries, for example, libavcodec.so, libavcodec.so.57, libavcodec.so.57.107.100, the first two files is soft link file The problem is when I go build my golang project, go module only download libavcodec.so.57.107.100, it didn't download the two soft link file

I tried to go get the package, and successfully get all the libraries including soft link file

I expect go module download all c dynamic libraries files including soft link files, but I didn't get the soft link files


Update: I submitted a issue in github, and seemed that this is intentional, see issue #32050

Go (in modules mode as well as in GOPATH mode) is concerned only with Go source code and will download only Go packages (which might contain C code) but it never installs shared libraries on your system or does other installation work (like creating symlinks).

There is no way you can convince or force the go tool to do what you think it should do.

Install the required shared object files and the necessary symlinks in any other means you find convenient n your system.