Linux

如何在 Ubuntu 18.04 中啟用正確的 Snap 功能

  • October 9, 2019

在這裡嘗試通過 安裝軟體包snapd,但不斷收到以下輸出:

$ sudo snap hello Warning: /snap/bin was not found in your $PATH. If you've not restarted your session since you installed snapd, try doing that. Please see https://forum.snapcraft.io/t/9469 for more details.

嘗試執行應用程序時,收到以下資訊:

$ hello Command 'hello' is available in '/snap/bin/hello' The command could not be located because '/snap/bin' is not included in the PATH environment variable. hello: command not found

有人可以幫忙嗎?

只需PATH=$PATH:/snap/bin在正確文件的末尾添加.bashrc,記住 root 使用者與使用者不同。

然後$ source .bashrc$ hello

引用自:https://unix.stackexchange.com/questions/543692