Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Cannot Install MPV - issues with libavcodec

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
nick_0189
n00b
n00b
Posts: 25
Joined: Thu Jul 28, 2022 10:17 pm

Cannot Install MPV - issues with libavcodec

  • Quote

Post by nick_0189 » Sat Jan 10, 2026 4:12 pm

Hello,

I am attempting to install mpv with emerge, but I receive an error:

Code: Select all

FAILED: [code=1] mpv_protocols
/usr/lib/python-exec/python3.13/meson --internal exe --capture mpv_protocols -- /var/tmp/portage/media-video/mpv-0.40.0-r3/work/mpv-0.40.0-build/mpv --no-config --list-protocols
--- stderr ---

ninja: build stopped: subcommand failed.
 * ERROR: media-video/mpv-0.40.0-r3::gentoo failed (compile phase):
 *   ninja -v -l11 -j12 failed
 *
 * Call stack:
 *     ebuild.sh, line  143:  Called src_compile
 *   environment, line 2809:  Called meson_src_compile
 *   environment, line 2065:  Called eninja
 *   environment, line 1508:  Called die
 * The specific snippet of code:
 *       "$@" || die -n "${*} failed"
 *
 * If you need support, post the output of `emerge --info '=media-video/mpv-0.40.0-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-video/mpv-0.40.0-r3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-video/mpv-0.40.0-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-video/mpv-0.40.0-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/media-video/mpv-0.40.0-r3/work/mpv-0.40.0-build'
 * S: '/var/tmp/portage/media-video/mpv-0.40.0-r3/work/mpv-0.40.0'

>>> Failed to emerge media-video/mpv-0.40.0-r3, Log file:

>>>  '/var/tmp/portage/media-video/mpv-0.40.0-r3/temp/build.log'

 * Messages for package media-video/mpv-0.40.0-r3:

 * ERROR: media-video/mpv-0.40.0-r3::gentoo failed (compile phase):
 *   ninja -v -l11 -j12 failed
 * Call stack:
 *     ebuild.sh, line  143:  Called src_compile
 *   environment, line 2809:  Called meson_src_compile
 *   environment, line 2065:  Called eninja
 *   environment, line 1508:  Called die
 * The specific snippet of code:
 *       "$@" || die -n "${*} failed"
 * If you need support, post the output of `emerge --info '=media-video/mpv-0.40.0-r3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-video/mpv-0.40.0-r3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/media-video/mpv-0.40.0-r3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-video/mpv-0.40.0-r3/temp/environment'.
 * Working directory: '/var/tmp/portage/media-video/mpv-0.40.0-r3/work/mpv-0.40.0-build'
 * S: '/var/tmp/portage/media-video/mpv-0.40.0-r3/work/mpv-0.40.0'
And running `/var/tmp/portage/media-video/mpv-0.40.0-r3/work/mpv-0.40.0-build/mpv` returns the following line of interest:

Code: Select all

libavcodec: build version 62.15.100 incompatible with runtime version 61.19.101
Output of `emerge -pqv '=media-video/mpv-0.40.0-r3::gentoo'`:

Code: Select all

[ebuild  N    ] media-video/mpv-0.40.0-r3  USE="X alsa cdda cli drm dvd egl iconv jpeg lcms libmpv lua uchardet vulkan wayland xv zlib (-aqua) -archive -bluray (-coreaudio) -debug -dvb -gamepad -jack -javascript -libcaca -nvenc -openal -pipewire -pulseaudio -rubberband -sdl (-selinux) -sixel -sndio -soc -test -tools -vaapi -vdpau -zimg" LUA_SINGLE_TARGET="(luajit) (-lua5-1)" PYTHON_SINGLE_TARGET="python3_13 -python3_11 -python3_12 -python3_14"
Output of `emerge --info '=media-video/mpv-0.40.0-r3::gentoo'`: https://zerobin.net/?6bf3da4085617dfc#S ... 5HwE4aA9g=

The context of the error is that my Gentoo system has gone some months without an update, but everything else could be updated without issue. I did the following:

Code: Select all

doas nvim /var/lib/portage/world
# Pruned world file of extra atoms

# Sync repos
doas emaint --auto sync

# Update System
doas emerge --ask --verbose --update --deep --newuse --with-bdeps=y @world
# Update fails because of mpv

doas emerge --deselect mpv
# Also remove mpv from world file

# Update System (try again)
doas emerge --ask --verbose --update --deep --newuse --with-bdeps=y @world
# Update succeeds

doas emerge --depclean
# Removes now unnecessary packages from edits to `world` file. 

# Install mpv
doas emerge -av media-video/mpv
# Fails with error above
I also tried running `emerge -e @world`, but still the mpv package will not compile.

This sort of problem is new to me. Does anybody have a theory about what could be wrong? I think the mismatched `libavcodec` would be the most obvious problem - I get the same sort of error when trying to compile it from the source code directly, but I am unsure how to fix that. Any help would be appreciated.

Thanks!
Top
netfab
Advocate
Advocate
Posts: 2066
Joined: Thu Mar 03, 2005 1:27 pm
Location: 127.0.0.1

  • Quote

Post by netfab » Sat Jan 10, 2026 9:23 pm

Hi,

Can you please share the whole build log :

Code: Select all

* The complete build log is located at '/var/tmp/portage/media-video/mpv-0.40.0-r3/temp/build.log'.
Top
nick_0189
n00b
n00b
Posts: 25
Joined: Thu Jul 28, 2022 10:17 pm

  • Quote

Post by nick_0189 » Sat Jan 10, 2026 9:54 pm

Yes, here is the whole build log: https://zerobin.net/?300457d254c579bc#Y ... dnDf7tIoI=

Please let me know if there's other information I should provide.
Top
netfab
Advocate
Advocate
Posts: 2066
Joined: Thu Mar 03, 2005 1:27 pm
Location: 127.0.0.1

  • Quote

Post by netfab » Sat Jan 10, 2026 11:09 pm

Please post the output of :

Code: Select all

$ pkg-config --path libavcodec

Code: Select all

$ pkg-config --modversion libavcodec

Code: Select all

$ ls -l /usr/lib64/libavcodec.so*
Top
nick_0189
n00b
n00b
Posts: 25
Joined: Thu Jul 28, 2022 10:17 pm

  • Quote

Post by nick_0189 » Sat Jan 10, 2026 11:16 pm

Hello,

The requested output is as follows:

Code: Select all

pkg-config --path libavcodec
/usr/lib64/pkgconfig/libavcodec.pc

pkg-config --modversion libavcodec
61.19.101

ls -l /usr/lib64/libavcodec.so*
lrwxrwxrwx 1 root root       23 Jan 10 01:23 /usr/lib64/libavcodec.so -> libavcodec.so.61.19.101
lrwxrwxrwx 1 root root       23 Jan 10 01:23 /usr/lib64/libavcodec.so.61 -> libavcodec.so.61.19.101
-rwxr-xr-x 1 root root 12822808 Jan 10 01:23 /usr/lib64/libavcodec.so.61.19.101

I at one point installed a version of ffmpeg from their git repository to test something, is is possible that something from that installation was left behind? I don't remember how I uninstalled it.
Top
netfab
Advocate
Advocate
Posts: 2066
Joined: Thu Mar 03, 2005 1:27 pm
Location: 127.0.0.1

  • Quote

Post by netfab » Sat Jan 10, 2026 11:19 pm

Do you have something in /usr/local related to ffmpeg ? headers ?
Top
nick_0189
n00b
n00b
Posts: 25
Joined: Thu Jul 28, 2022 10:17 pm

  • Quote

Post by nick_0189 » Sun Jan 11, 2026 12:02 am

netfab, thanks for your quick responses. There are some header files for libavcodec in `/usr/local`:

Code: Select all

find /usr/local/ | grep -i libavcodec
/usr/local/lib/libavcodec.a
/usr/local/lib/pkgconfig/libavcodec.pc
/usr/local/share/doc/ffmpeg/libavcodec.html
/usr/local/share/man/man3/libavcodec.3
/usr/local/include/libavcodec
/usr/local/include/libavcodec/ac3_parser.h
/usr/local/include/libavcodec/adts_parser.h
/usr/local/include/libavcodec/avcodec.h
/usr/local/include/libavcodec/avdct.h
/usr/local/include/libavcodec/bsf.h
/usr/local/include/libavcodec/codec.h
/usr/local/include/libavcodec/codec_desc.h
/usr/local/include/libavcodec/codec_id.h
/usr/local/include/libavcodec/codec_par.h
/usr/local/include/libavcodec/d3d11va.h
/usr/local/include/libavcodec/defs.h
/usr/local/include/libavcodec/dirac.h
/usr/local/include/libavcodec/dv_profile.h
/usr/local/include/libavcodec/dxva2.h
/usr/local/include/libavcodec/exif.h
/usr/local/include/libavcodec/jni.h
/usr/local/include/libavcodec/mediacodec.h
/usr/local/include/libavcodec/packet.h
/usr/local/include/libavcodec/qsv.h
/usr/local/include/libavcodec/smpte_436m.h
/usr/local/include/libavcodec/vdpau.h
/usr/local/include/libavcodec/version.h
/usr/local/include/libavcodec/version_major.h
/usr/local/include/libavcodec/videotoolbox.h
/usr/local/include/libavcodec/vorbis_parser.h
I'll have to look closer to see how those headers relate to ffmpeg.

Code: Select all

find /usr/local/ | grep -i ffmpeg
/usr/local/share/doc/ffmpeg
/usr/local/share/doc/ffmpeg/ffmpeg.html
/usr/local/share/doc/ffmpeg/ffplay.html
/usr/local/share/doc/ffmpeg/ffprobe.html
/usr/local/share/doc/ffmpeg/ffmpeg-all.html
/usr/local/share/doc/ffmpeg/ffplay-all.html
/usr/local/share/doc/ffmpeg/ffprobe-all.html
/usr/local/share/doc/ffmpeg/ffmpeg-utils.html
/usr/local/share/doc/ffmpeg/ffmpeg-scaler.html
/usr/local/share/doc/ffmpeg/ffmpeg-resampler.html
/usr/local/share/doc/ffmpeg/ffmpeg-codecs.html
/usr/local/share/doc/ffmpeg/ffmpeg-bitstream-filters.html
/usr/local/share/doc/ffmpeg/ffmpeg-formats.html
/usr/local/share/doc/ffmpeg/ffmpeg-protocols.html
/usr/local/share/doc/ffmpeg/ffmpeg-devices.html
/usr/local/share/doc/ffmpeg/ffmpeg-filters.html
/usr/local/share/doc/ffmpeg/libavutil.html
/usr/local/share/doc/ffmpeg/libswscale.html
/usr/local/share/doc/ffmpeg/libswresample.html
/usr/local/share/doc/ffmpeg/libavcodec.html
/usr/local/share/doc/ffmpeg/libavformat.html
/usr/local/share/doc/ffmpeg/libavdevice.html
/usr/local/share/doc/ffmpeg/libavfilter.html
/usr/local/share/doc/ffmpeg/community.html
/usr/local/share/doc/ffmpeg/developer.html
/usr/local/share/doc/ffmpeg/faq.html
/usr/local/share/doc/ffmpeg/fate.html
/usr/local/share/doc/ffmpeg/general.html
/usr/local/share/doc/ffmpeg/git-howto.html
/usr/local/share/doc/ffmpeg/mailing-list-faq.html
/usr/local/share/doc/ffmpeg/nut.html
/usr/local/share/doc/ffmpeg/platform.html
/usr/local/share/doc/ffmpeg/bootstrap.min.css
/usr/local/share/doc/ffmpeg/style.min.css
/usr/local/share/doc/ffmpeg/default.css
/usr/local/share/man/man1/ffmpeg.1
/usr/local/share/man/man1/ffmpeg-all.1
/usr/local/share/man/man1/ffmpeg-utils.1
/usr/local/share/man/man1/ffmpeg-scaler.1
/usr/local/share/man/man1/ffmpeg-resampler.1
/usr/local/share/man/man1/ffmpeg-codecs.1
/usr/local/share/man/man1/ffmpeg-bitstream-filters.1
/usr/local/share/man/man1/ffmpeg-formats.1
/usr/local/share/man/man1/ffmpeg-protocols.1
/usr/local/share/man/man1/ffmpeg-devices.1
/usr/local/share/man/man1/ffmpeg-filters.1
/usr/local/share/ffmpeg
/usr/local/share/ffmpeg/examples
/usr/local/share/ffmpeg/examples/avio_http_serve_files.c
/usr/local/share/ffmpeg/examples/avio_list_dir.c
/usr/local/share/ffmpeg/examples/avio_read_callback.c
/usr/local/share/ffmpeg/examples/decode_audio.c
/usr/local/share/ffmpeg/examples/decode_filter_audio.c
/usr/local/share/ffmpeg/examples/decode_filter_video.c
/usr/local/share/ffmpeg/examples/decode_video.c
/usr/local/share/ffmpeg/examples/demux_decode.c
/usr/local/share/ffmpeg/examples/encode_audio.c
/usr/local/share/ffmpeg/examples/encode_video.c
/usr/local/share/ffmpeg/examples/extract_mvs.c
/usr/local/share/ffmpeg/examples/filter_audio.c
/usr/local/share/ffmpeg/examples/hw_decode.c
/usr/local/share/ffmpeg/examples/mux.c
/usr/local/share/ffmpeg/examples/qsv_decode.c
/usr/local/share/ffmpeg/examples/qsv_transcode.c
/usr/local/share/ffmpeg/examples/remux.c
/usr/local/share/ffmpeg/examples/resample_audio.c
/usr/local/share/ffmpeg/examples/scale_video.c
/usr/local/share/ffmpeg/examples/show_metadata.c
/usr/local/share/ffmpeg/examples/transcode.c
/usr/local/share/ffmpeg/examples/transcode_aac.c
/usr/local/share/ffmpeg/examples/vaapi_encode.c
/usr/local/share/ffmpeg/examples/vaapi_transcode.c
/usr/local/share/ffmpeg/examples/README
/usr/local/share/ffmpeg/examples/Makefile
/usr/local/share/ffmpeg/libvpx-1080p.ffpreset
/usr/local/share/ffmpeg/libvpx-1080p50_60.ffpreset
/usr/local/share/ffmpeg/libvpx-360p.ffpreset
/usr/local/share/ffmpeg/libvpx-720p.ffpreset
/usr/local/share/ffmpeg/libvpx-720p50_60.ffpreset
/usr/local/share/ffmpeg/ffprobe.xsd
Unfortunately, I'll be AFK for the next few days. Thanks again for your help here. I'll be able to respond again in a week or so.
Top
Hu
Administrator
Administrator
Posts: 24380
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Jan 11, 2026 12:45 am

None of the shown files from /usr/local should be there. That is likely the source of your problem. Please remove the manually installed ffmpeg and try again.
Top
nick_0189
n00b
n00b
Posts: 25
Joined: Thu Jul 28, 2022 10:17 pm

  • Quote

Post by nick_0189 » Thu Jan 22, 2026 12:44 am

Removing the libavcodec files gave some progress, but a similar error was given with another file.

There didn't seem to be anything super important in `/usr/local`.

Code: Select all

equery belongs /usr/local/

 * Searching for /usr/local/ ...
Moving it resolved the issue.

Code: Select all

mv /usr/local /usr/local.bkup
Thanks for the suggestion!
Top
Post Reply

9 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy