dsvjw20866 2019-05-15 04:36
浏览 391

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

  • 写回答

1条回答 默认 最新

  • douzhi1879 2019-05-15 06:04
    关注

    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.

    评论

报告相同问题?

悬赏问题

  • ¥20 @microsoft/fetch-event-source 流式响应问题
  • ¥15 ogg dd trandata 报错
  • ¥15 高缺失率数据如何选择填充方式
  • ¥50 potsgresql15备份问题
  • ¥15 Mac系统vs code使用phpstudy如何配置debug来调试php
  • ¥15 目前主流的音乐软件,像网易云音乐,QQ音乐他们的前端和后台部分是用的什么技术实现的?求解!
  • ¥60 pb数据库修改与连接
  • ¥15 spss统计中二分类变量和有序变量的相关性分析可以用kendall相关分析吗?
  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False