2

Got this error during installation of gnuradio. I also got this:

usr/share/mime/packages/gnuradio.xml:1: parser error : Start tag expected, '<' not found.

Should I be concerned? Everything else completes without errors.

2
  • head -n3 /usr/share/mime/packages/gnuradio.xml edit your question for the output.
    – nobody
    Jul 13, 2019 at 9:05
  • My apologies, but I fail to parse the comment.
    – Gordon
    Jul 14, 2019 at 0:13

3 Answers 3

3
  1. Delete /usr/share/mime/packages/gnuradio.xml.
  2. Symlink gnuradio-grc.xml to gnuradio.xml:

    sudo ln -s gnuradio-grc.xml gnuradio.xml
    
4
  • 1
    Hello and welcome to AskUbuntu. Please provide some explanation, why the deleting and symlink creation is needed. Oct 14, 2019 at 8:57
  • /usr/share/mime/packages/gnuradio.xml contains a single line "/usr/share/mime/packages/gnuradio-grc.xml". Sorry for my bad English. Oct 15, 2019 at 9:28
  • Installation process failed to create a symlink. Oct 15, 2019 at 18:32
  • Please "edit" your answer and add the explanation Oct 16, 2019 at 12:53
1

Error Message

Processing triggers for shared-mime-info (1.9-2) ...
/usr/share/mime/packages/gnuradio.xml:1: parser error : Start tag expected, '<' not found
/usr/share/gnuradio/grc/freedesktop/gnuradio-grc.xml
^
Failed to parse '/usr/share/mime/packages/gnuradio.xml'
patrick@Aspire1:~$ ls -al /usr/share/gnuradio/grc/freedesktop/gnuradio-grc.xml
-rw-r--r-- 1 root root 265 Feb 27  2017 /usr/share/gnuradio/grc/freedesktop/gnuradio-grc.xml

The error message calls out the file, the line number (':1:') then shows the erroneous input on the next line (which is actually the full content (i.e. the only line) of the file) and points out the place where things went wrong with a '^'.

Analysis
  • Linux is trying to update the mime type database with a new entry for objects associated with gnuradio using XML-format data provided by the gqrx install packages
  • for reasons known only to themselves, the package maintainers provide the data in /usr/share/gnuradio/grc/freedesktop/gnuradio -grc .xml while the mime update utility is looking for /usr/share/gnuradio/grc/freedesktop/gnuradio.xml (N.B. NO '-grc') instead pointing to the XML by placing the *-grc.xml file name in the *.xml file and expecting update-mime-database to just figure it out.
  • update-mime-database throws the error message which kills the apt install process

This can be replicated by manually updating the mime database as follows:

sudo update-mime-database -V /usr/share/mime/
Updating MIME database in /usr/share/mime...

/usr/share/mime/packages/gnuradio.xml:1: parser error : Start tag expected, '<' not found
/usr/share/gnuradio/grc/freedesktop/gnuradio-grc.xml
^
Failed to parse '/usr/share/mime/packages/gnuradio.xml'
Wrote 1108 strings at 2c - 61d4

Wrote aliases at 61d4 - 6a40

Wrote parents at 6a40 - 82e4

Wrote literal globs at 82e4 - 83cc

Wrote suffix globs at 83cc - 130b4

Wrote full globs at 130b4 - 1310c

Wrote magic at 1310c - 1f7a8

Wrote namespace list at 1f7a8 - 1f8e4

Wrote icons list at 1f8e4 - 1f8e8

Wrote generic icons list at 1f8e8 - 204d4

Wrote types list at 204d4 - 21130
Resolution
  1. the contents of gnuradio.xml are bad so get rid of it
    2. sudo rm /usr/share/mime/packages/gnuradio.xml
  2. the contents of gnuradio-grc.xml are what's needed so link it
    4. sudo ln -s /usr/share/gnuradio/grc/freedesktop/gnuradio-grc.xml /usr/share/gnuradio/grc/freedesktop/gnuradio.xml
  3. test sudo update-mime-database -V /usr/share/mime/

Updating MIME database in /usr/share/mime...

Wrote 1108 strings at 2c - 61d4

Wrote aliases at 61d4 - 6a40

Wrote parents at 6a40 - 82e4

Wrote literal globs at 82e4 - 83cc

Wrote suffix globs at 83cc - 130b4

Wrote full globs at 130b4 - 1310c

Wrote magic at 1310c - 1f7a8

Wrote namespace list at 1f7a8 - 1f8e4

Wrote icons list at 1f8e4 - 1f8e8

Wrote generic icons list at 1f8e8 - 204d4

Wrote types list at 204d4 - 21130

Manually instructing apt and/or dpkg to continue from here may be required. This is unlikely to hurt anything in any case.

sudo apt-get -f install

    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

sudo dpkg --configure -a
0
sudo nano /usr/share/mime/packages/gnuradio.xml 

Go to the first row and make sure it begins with an <

sudo update-mime-database -V /usr/share/mime/

This updates the mime database.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .