If you've applied a fix for HTML5 video playback on Opera, it's possible you used the fix-opera-linux-ffmpeg-widevine script. This guide will help you resolve the following Dpkg error that may occur after uninstalling Opera:
readlink: missing operand
Try 'readlink --help' for more information.
stat: missing operand
Try 'stat --help' for more information.
E: Problem executing scripts DPkg::Pre-Invoke 'stat -c %Z $(readlink -f $(which opera)) > /tmp/opera.timestamp'
E: Sub-process returned an error codeThe error occurs because the script that tries to retrieve the timestamp of the Opera executable (opera.timestamp) at /tmp/opera.timestamp is failing. You can inspect the script causing this issue, typically located at /etc/apt/apt.conf.d/ or /var/lib/dpkg/info/, specifically named 99fix-opera.
To resolve this, follow these steps:
Navigate to the /tmp directory and clone this repository:
cd /tmp && git clone https://github.com/Ld-Hagen/fix-opera-linux-ffmpeg-widevine.gitMove into the root folder of the cloned repository:
cd /tmp/fix-opera-linux-ffmpeg-widevineMake the uninstall.sh script executable:
chmod +x uninstall.shRun the script to remove the problematic Opera fix. If the script runs successfully, proceed with further steps if needed.
sudo ./uninstall.shsudo dpkg --configure -a # or
sudo apt updateThis project is licensed under the MIT License - see the LICENSE file for details.