GDebI 0.9.5.7通过Firefox打开.deb包点击安装闪退求助
Hey there, let's work through this frustrating GDebI crash issue you're hitting. It makes total sense that manually importing the .deb works but opening it straight from Firefox doesn't—this almost always boils down to how Firefox is passing the file to GDebI, or a small misconfiguration in GDebI's desktop settings. Here are the steps I'd recommend to fix this:
1. Verify Firefox's .deb File Association Settings
First, let's make sure Firefox is pointing to the right GDebI executable and using the correct parameters:
- Open Firefox, click the menu button (three lines in the top-right) and go to Settings > scroll down to the Applications section.
- Find the entry for Debian Package (.deb). Click the dropdown menu next to it.
- If it's set to something other than "GDebI Package Installer", select that option.
- If you don't see GDebI listed, click Choose and navigate to
/usr/bin/gdebi-gtk(this is the GUI version of GDebI) and select it.
2. Fix GDebI's Desktop File Configuration
Sometimes the .desktop file that tells your system how to launch GDebI has incorrect parameters for handling files from browsers:
- Open a terminal and run this command to edit the GDebI desktop file:
sudo nano /usr/share/applications/gdebi.desktop - Look for the line that starts with
Exec=. It should look like this:Exec=gdebi-gtk %f%ftells GDebI to handle a single local file, which is exactly what Firefox sends. If you see%Uinstead, that's also okay (it handles URLs/local files), but if there's no parameter at all, that's the problem—add%fat the end.
- Save the file by pressing
Ctrl+O, hit Enter, then exit withCtrl+X. - Update the desktop database to apply the changes:
update-desktop-database /usr/share/applications/
3. Test the Command Line to Diagnose Exact Errors
You mentioned you ran Firefox from the terminal to check output—let's use that to pinpoint the issue:
- Close all Firefox windows first, then run:
firefox - Download a .deb file, open it directly from Firefox, and watch the terminal for error messages. Common issues here might be:
- Permission errors accessing the temporary download file (Firefox stores downloads in
/tmp/mozilla_yourusername/by default) - GDebI failing to parse the file path Firefox sends
- Permission errors accessing the temporary download file (Firefox stores downloads in
- You can also test the exact command Firefox would run manually: if your downloaded file is at
/tmp/mozilla_xxx/test.deb, run:
If this crashes too, the problem is with how GDebI handles temporary files—try moving the deb to your Downloads folder first, or check the permissions of thegdebi-gtk /tmp/mozilla_xxx/test.deb/tmpdirectory (it should bedrwxrwxrwt).
4. Reinstall GDebI (As a Last Resort)
If the above steps don't work, a fresh install of GDebI can fix corrupted configurations:
sudo apt purge gdebi gdebi-core sudo apt install gdebi gdebi-core
After reinstalling, double-check the file associations in Firefox again to make sure they're set correctly.
内容的提问来源于stack exchange,提问作者Alessandro

