This error occurs when using the gdebi-gtk GUI to install .deb packages on Ubuntu. The issue is caused by a bug in how gdebi-gtk handles file descriptors passed to dpkg. Switching to command-line installation methods resolves the problem immediately.
The "unable to read filedescriptor flags" error indicates that dpkg cannot access a file descriptor used for managing package status and installation progress. This happens because gdebi-gtk does not properly inherit or configure file descriptors when spawning the dpkg process. The error message typically includes a path to /var/lib/dpkg/updates/, which is where dpkg stores temporary installation state. The underlying cause is that in Python 3.4+, file descriptors are not inherited by child processes by default, and gdebi-gtk did not use os.set_inheritable() to work around this limitation.
The most reliable immediate fix is to avoid the gdebi-gtk GUI entirely. Open a terminal and install your .deb package directly:
sudo dpkg -i /path/to/package.debIf there are dependency issues, use apt to resolve them after:
sudo apt install -fAlternatively, you can also use gdebi from the command line, which works without this bug:
sudo gdebi /path/to/package.debUbuntu has released fixes for gdebi and gdebi-gtk that address this file descriptor handling issue. Update your system to install the patched version:
sudo apt update
sudo apt upgradeIf gdebi or gdebi-gtk is not installed, you can install it:
sudo apt install gdebiAfter updating, try using gdebi-gtk again to see if the issue is resolved.
The /var/lib/dpkg/updates/ directory should be empty when no dpkg operations are running. If it contains leftover files from a failed installation, clean it up:
sudo rm -f /var/lib/dpkg/updates/*Then attempt your installation again. This ensures dpkg starts fresh without corrupted state from previous attempts.
This bug has been tracked in Ubuntu as Bug #1756238 (Ubuntu 18.04) and Bug #1946499 (Ubuntu 21.10+). The root cause is in the interaction between gdebi-gtk, Python 3.4+, and the VTE library. The gdebi project has patched this issue upstream, but the fix requires updating to a newer version of gdebi/gdebi-gtk. If you are on a very old Ubuntu release, the patch may not be available, making command-line installation the permanent workaround. For developers maintaining packages, note that gdebi-gtk is optional for package installation; dpkg and apt are the standard tools.
E: Could not connect to proxy server
Could not connect to proxy server
E: Package 'package:i386' has no installation candidate
How to fix "Package package:i386 has no installation candidate" in apt
E: The value 'value' is invalid for APT::Default-Release
How to fix invalid APT::Default-Release value in APT
dpkg: error: unable to create new file 'path': Permission denied
How to fix dpkg permission denied errors in APT
subprocess installed post-removal script returned error exit status 1
How to fix "subprocess installed post-removal script returned error exit status 1" in APT