Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 514  / 3 Years ago, fri, july 23, 2021, 5:03:02

After doing some package installs, the desktop-file-utils package is now failing to be installed via apt and aptitude. This is for Xubuntu 20.04.2.


When running apt, I now always get this error:


dpkg: error processing package desktop-file-utils (--configure):
installed desktop-file-utils package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
desktop-file-utils

I know that I can purge this package, but then quite a few of its dependencies will also be uninstalled, and my system is likely to become unusable.


I don't understand what could have caused this problem, because I don't know what I could have done to affect this package.


Is there some way to fix this other than purging desktop-file-utils and making my system unusable? Also, is there some way where I can get more detailed information about exactly how the post-installation script is failing? If so, perhaps I could debug this.


Thank you in advance for any suggestions.


More From » apt

 Answers
0

It turns out that this has nothing to do with packages nor with the apt system.


I discovered that I had accidentally set XDG_DATA_DIRS to point to a non-existent directory.


Once I fixed this, the problem went away.


Here are more details as to why this fixed the problem ...


These are the contents of /var/lib/dpkg/info/desktop-file-utils.postinst ...


#!/bin/sh

set -e

update-desktop-database -q

if [ "$1" = "triggered" ]; then
exit 0
fi

I ran update-desktop-database -q from the command line, and it didn't give any output, but it exited with a non-zero return code.


I ran it again like this: update-desktop-database -v. This time, it gave an error message which stated that the applications subdirectory of the path that is contained in XDG_DATA_DIRS didn't exist. This showed me that I had set XDG_DATA_DIRS incorrectly.


Once I reset XDG_DATA_DIRS to a proper value, the update-desktop-database command started exiting with a zero return code, and the desktop-file-utils error in apt that I mentioned above stopped occurring.


[#859] Saturday, July 24, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
njuash

Total Points: 402
Total Questions: 125
Total Answers: 98

Location: Jersey
Member since Sun, Dec 4, 2022
1 Year ago
njuash questions
Wed, Jun 8, 22, 11:53, 2 Years ago
Wed, Nov 30, 22, 11:42, 2 Years ago
Mon, May 30, 22, 04:33, 2 Years ago
Mon, Apr 10, 23, 03:40, 1 Year ago
;