我将 Python 2.7.15+ 符号python链接到python3. 当我尝试将 Ubuntu 升级到 19.04 时
sudo do-release-upgrade
Run Code Online (Sandbox Code Playgroud)
它返回以下错误:
Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-k7w2kx7r/disco", line 8, in <module>
sys.exit(main())
File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeMain.py", line 238, in main
if app.run():
File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 2085, in run
return self.fullUpgrade()
File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 1906, in fullUpgrade
if not self.askLivepatch():
File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 1175, in askLivepatch
version = next((r.version for r in di.get_all("object") if r.series == self.toDist), self.toDist)
AttributeError: 'UbuntuDistroInfo' object has no attribute 'get_all'
Error in …Run Code Online (Sandbox Code Playgroud) 通常,我应该编写一个 FileType.xml 并使用
xdg-mime install FileType.xml
Run Code Online (Sandbox Code Playgroud)
然后使用
xdg-mime default xxx.desktop file-type
Run Code Online (Sandbox Code Playgroud)
设置默认应用程序和
xdg-icon-resource install xxx
Run Code Online (Sandbox Code Playgroud)
设置默认图标。最后,删除FileType.xml。
老实说,我永远记不起 FileType.xml 的格式和“xdg-icon-resource”的参数。当我想安装新的文件类型时,这对我来说是一种折磨。
那么,有 xdg-mime 的 GUI 工具吗?