Skip to content

fatal error: libavresample/avresample.h: No such file or directory #127

@zengqingfa

Description

@zengqingfa

I have ffmpeg installed.
I want to test the code in joy4/examples/audio_decode/main.go when the program reported the following error:

# github.com/nareix/joy4/cgo/ffmpeg
In file included from /root/go/pkg/mod/github.com/nareix/joy4@v0.0.0-20200507095837-05a4ffbb5369/cgo/ffmpeg/audio.go:4:0:
./ffmpeg.h:5:10: fatal error: libavresample/avresample.h: No such file or directory
 #include <libavresample/avresample.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

when I execute go get github.com/nareix/joy4/cgo/ffmpeg ,the error appears again.

Then execute the following commands.

sudo apt-get -y install autoconf automake build-essential libass-dev libfreetype6-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texi2html zlib1g-dev

sudo apt install -y libavdevice-dev libavfilter-dev libswscale-dev libavcodec-dev libavformat-dev libswresample-dev libavutil-dev

But the program still reports errors, so what can I do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions