Can't upgrade from 8.0.2 to any newer version with an old CPU without avx2

Due to recent security issue i was trying to upgrade a yunohost app peertube on an old system.

It did fail at upgrade, service peertube fails

2026-05-25 14:46:54,471: WARNING - mai 25 14:46:45 systemd[1]: Started peertube.service - PeerTube: video streaming platform.
2026-05-25 14:46:54,471: WARNING - mai 25 14:46:49 systemd[1]: peertube.service: Main process exited, code=killed, status=4/ILL
2026-05-25 14:46:54,471: WARNING - mai 25 14:46:49 systemd[1]: peertube.service: Failed with result ‹ signal ›.
2026-05-25 14:46:54,472: WARNING - mai 25 14:46:49 systemd[1]: peertube.service: Consumed 4.946s CPU time.

and dmesg allowed me to find out culprit :

[ +4,611232] traps: MainThread[89118] trap invalid opcode ip:7f22c8f3d2e8 sp:7ffc33966e00 error:0 in libvips-cpp.so.8.17.3[7f22c8d0a000+a7b000]

That is related to a thumbnail rebuilding feature in peertube 8.1.0 using sharp library ( https://www.npmjs.com/package/sharp ) relying on libvips ( GitHub - libvips/libvips: A fast image processing library with low memory needs. · GitHub ) requiring cpu with avx2 support.

Given the old system used for it and that i can’t get hand on the hardware which is at 1200km away … this will be a challenge …

so i am sitll on 8.0.2 that i did patch manualy using What versions are affected by security issues corrected by v8.1.6? · Issue #7622 · Chocobozzz/PeerTube · GitHub

Can’t do better now.

Hi,

Can you try Prebuilt sharp not working with some CPUs · Issue #7495 · Chocobozzz/PeerTube · GitHub?

1 « J'aime »

Thanks @Chocobozzz

this was not as simple as expected since there is not a full procedure to build libvips for this sharp usage.

finaly i got it working, reading various github posts, custom libvips should be installed globally using meson build –prefix /src.

This is dangerous if any debian libvips is already installed. i didn’t check if i could debian one, but i thing there would be a version problem, and a conflict.

This is really a patch solution not following gold stand standard for yunohost, but at least, it fixed my problem.

i mention it here but THIS IS TWEAK AND RISKY TO USE THIS

yunohost app install GitHub - artlog/peertube_ynh at no_avx2 · GitHub

It has interest to see build procedure used :

for npm sharp this is in install or upgrade scripts , a direct adaption of proposed fix.

pushd « $install_dir »
ynh_script_progression « Building sharp from source… »
vips_version=8.17.3
build_vips
ynh_hide_warnings ynh_exec_as_app pnpm add --workspace-root --no-lockfile --prod node-addon-api node-gyp
ynh_hide_warnings ynh_exec_as_app SHARP_FORCE_GLOBAL_LIBVIPS=1 npm explore sharp – npm run build
ynh_hide_warnings ynh_exec_as_app pnpm install
ynh_hide_warnings ynh_exec_as_app pnpm store prune
popd

if all goes well

ls -la /usr/lib/x86_64-linux-gnu/libvips*

lrwxrwxrwx 1 root root      17 27 mai   10:10 /usr/lib/x86_64-linux-gnu/libvips-cpp.so → libvips-cpp.so.42
lrwxrwxrwx 1 root root      22 27 mai   10:10 /usr/lib/x86_64-linux-gnu/libvips-cpp.so.42 → libvips-cpp.so.42.19.3
-rwxr-xr-x 1 root root  329736 27 mai   10:10 /usr/lib/x86_64-linux-gnu/libvips-cpp.so.42.19.3
lrwxrwxrwx 1 root root      13 27 mai   10:10 /usr/lib/x86_64-linux-gnu/libvips.so → libvips.so.42
lrwxrwxrwx 1 root root      18 27 mai   10:10 /usr/lib/x86_64-linux-gnu/libvips.so.42 → libvips.so.42.19.3
-rwxr-xr-x 1 root root 3547976 27 mai   10:10 /usr/lib/x86_64-linux-gnu/libvips.so.42.19.3