Solved Running pkg upgrade today broke mpv

Today I ran pkg update, pkg upgrade. I then went to play a video using mpv, and got a message of not being able to open libavcodec.so.60

Did a quick websearch and it seems this problem happens from time to time. There were various suggestions, and I chose the one of reinstalling mpv from ports. Had one small problem of a conflict of dependencies, py311-docutils conflicted with py39-docutils. However, I was able to uninstall the existing py39-docutils. It didn't remove anything else. After reinstalling mpv, using ports, the video played.

I apologize for the paucity of information. I was pretty sleepy and didn't bother to note exact error messages, but I'm putting this here in case someone else does an upgrade today and runs into the same issue. It *seems* (that is, worked for me), that it can be solved by reinstalling mpv from ports (which doesn't take more than a few minutes). I also didn't pay close attention to what, if anything, was removed during the pkg upgrade. So, as a bug report, this is pretty useless, again, I'm posting in case it hits anyone else. Though I can't be sure that something obvious was removed, it may just be a library version bump or the like.
Also, for packages I have it set to latest, not quarterly.

I realized I had a test box to try so got better error messages.

When I first tried to play a video with mpv, I got
Code:
ld-elf.so.1: /usr/local/lib/libavcodec.so.60: version LIBAVCODEC_60 required by /usr/local/bin/mpv not defined

But see Mikael's post below. You may just have to pkg delete mpv, then pkg install mpv
 
Same here, on two different machines, both running 14.3-RELEASE-p5.

/usr/local/lib/libavcodec.so.60 belongs to ffmpeg.

Here is what pkg upgrade included:
Code:
The following 9 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
        ffmpeg: 6.1.2_16,1 -> 6.1.2_17,1 [FreeBSD]
        firefox: 145.0.1_1,2 -> 145.0.2,2 [FreeBSD]
        libarchive: 3.8.2,1 -> 3.8.3,1 [FreeBSD]
        libdeflate: 1.24 -> 1.25 [FreeBSD]
        libheif: 1.19.8_4 -> 1.19.8_5 [FreeBSD]
        luajit: 2.1.0.20251016 -> 2.1.0.20251116 [FreeBSD]
        utf8proc: 2.11.1 -> 2.11.2 [FreeBSD]
        x265: 3.6_1 -> 4.1 [FreeBSD]
        xorg-server: 21.1.18_1,1 -> 21.1.20,1 [FreeBSD]

Number of packages to be upgraded: 9

The process will require 1 MiB more space.
92 MiB to be downloaded.

Proceed with this action? [y/N]: y

mpv was not updated but pkg delete mpv followed by pkg install mpv installs a newer build of mpv.

Before:
Code:
% mpv
mpv v0.40.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
 built on Sep 18 2025 01:26:10

After:
Code:
% mpv
mpv v0.40.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
 built on Nov 25 2025 01:54:48

I'm curious what went wrong here?
 
FWIW, it must be a -RELEASE thing because it did not happen to me, mpv continued to work just fine without issues (and yes, ffmpeg was updated this morning for me too). I run -STABLE and my mpv build is Oct 14 2025 08:01:21
 
Today I ran pkg update, pkg upgrade. I then went to play a video using mpv, and got a message of not being able to open libavcodec.so.60

Did a quick websearch and it seems this problem happens from time to time. There were various suggestions, and I chose the one of reinstalling mpv from ports. Had one small problem of a conflict of dependencies, py311-docutils conflicted with py39-docutils. However, I was able to uninstall the existing py39-docutils. It didn't remove anything else. After reinstalling mpv, using ports, the video played.

I apologize for the paucity of information. I was pretty sleepy and didn't bother to note exact error messages, but I'm putting this here in case someone else does an upgrade today and runs into the same issue. It *seems* (that is, worked for me), that it can be solved by reinstalling mpv from ports (which doesn't take more than a few minutes). I also didn't pay close attention to what, if anything, was removed during the pkg upgrade. So, as a bug report, this is pretty useless, again, I'm posting in case it hits anyone else. Though I can't be sure that something obvious was removed, it may just be a library version bump or the like.
Also, for packages I have it set to latest, not quarterly.

I realized I had a test box to try so got better error messages.

When I first tried to play a video with mpv, I got
Code:
ld-elf.so.1: /usr/local/lib/libavcodec.so.60: version LIBAVCODEC_60 required by /usr/local/bin/mpv not defined

But see Mikael's post below. You may just have to pkg delete mpv, then pkg install mpv
I didn't delete just reinstall and works.
 
Back
Top