小编edd*_*eek的帖子

在没有 PackageKit 的情况下处理未找到命令

我已经在 Fedora 上卸载了 PackageKit,因为我不需要命令行的膨胀和竞争条件。

\n\n

从那时起,command-not-found 失败并显示以下内容:

\n\n
\xe2\x9d\xaf foo\nbash: foo: command not found...\nFailed to search for file: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not activate remote peer.\n# because...\n\xe2\x9d\xaf dbus-send --system --print-reply  --dest=org.freedesktop.PackageKit  \\\n    /org/freedesktop/PackageKit org.freedesktop.DBus.Properties.Get  \\  \n    string:\'org.freedesktop.PackageKit\' string:\'BackendName\'\n\nError org.freedesktop.DBus.Error.NameHasNoOwner: Could not activate remote peer.\n
Run Code Online (Sandbox Code Playgroud)\n\n

如果没有 PackageKit,如何保留命令未找到的功能?看来dnf应该可以自己解决这个问题?

\n\n

版本:

\n\n
    \n
  • Fedora 31 beta + gnome-shell 3.34.0 + zsh 5.7.1
  • \n
  • PackageKit-command-not-found-1.1.12-11.fc31.x86_64.rpm
  • \n
\n

shell fedora dnf

2
推荐指数
1
解决办法
1730
查看次数

标签 统计

dnf ×1

fedora ×1

shell ×1