安装时出现此错误gnuradio
。我还遇到了以下问题:
usr/share/mime/packages/gnuradio.xml:1: parser error : Start tag expected, '<' not found.
我应该担心吗?其他一切都顺利完成,没有错误。
答案1
- 删除
/usr/share/mime/packages/gnuradio.xml
。 符号链接
gnuradio-grc.xml
到gnuradio.xml
:sudo ln -s gnuradio-grc.xml gnuradio.xml
答案2
错误信息
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
错误信息调出文件,行号(':1:')然后在下一行显示错误输入(实际上是文件的全部内容(即唯一行))并用'^'指出出错的地方。
分析- Linux 正在尝试使用 gqrx 安装包提供的 XML 格式数据,用与 gnuradio 关联的对象的新条目来更新 mime 类型数据库
- 出于只有他们自己知道的原因,软件包维护者在 /usr/share/gnuradio/grc/freedesktop/gnuradio 中提供了数据-grc.xml 而 mime 更新实用程序正在寻找 /usr/share/gnuradio/grc/freedesktop/gnuradio.xml (NB NO '-grc'),而是通过将 *-grc.xml 文件名放在 *.xml 文件中并期望 update-mime-database 能够弄清楚来指向 XML。
- update-mime-database 抛出错误消息,终止 apt install 进程
可以通过手动更新 mime 数据库来复制,如下所示:
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
解决
- gnuradio.xml 的内容不好所以删除它
2.sudo rm /usr/share/mime/packages/gnuradio.xml
- gnuradio-grc.xml 的内容是所需要的,因此链接它
4。sudo ln -s /usr/share/gnuradio/grc/freedesktop/gnuradio-grc.xml /usr/share/gnuradio/grc/freedesktop/gnuradio.xml
- 测试
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
可能需要手动指示 apt 和/或 dpkg 从这里继续。无论如何,这不太可能造成任何损害。
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
答案3
sudo nano /usr/share/mime/packages/gnuradio.xml
转到第一行,确保它以<
sudo update-mime-database -V /usr/share/mime/
这将更新 mime 数据库。