Page MenuHomeSolus

Warning after installing a snap
Open, Needs More InfoPublic

Description

Hello everyone,

It seems that we have an issue with snapd.

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

I have reinstalled snapd, restarted my machine and reloaded my AppArmor. Nothing helped to remove this warning!

Thank you!

Event Timeline

Huh... what's the output of echo $PATH ?

erm can you run sudo usysconf run -f and reboot?

JoshStrobl edited projects, added Software; removed Lacks Project.Mar 26 2019, 4:19 PM
JoshStrobl triaged this task as Needs More Info priority.Mar 29 2019, 12:42 AM
brlin added a subscriber: brlin.EditedApr 4 2019, 5:17 PM

The problem seems to be caused by the sudoers policy:

/etc/sudoers:

# Solus doesn't support "local" directories, so you need to uncomment this line
# and comment out the other secure_path declaration if you want sudo to find these
# executables
# Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Defaults secure_path="/usr/sbin:/usr/bin:/sbin:/bin"

Consider append /snap/bin to the secure_path, after patching it manually I no longer reproduce the warning.

brlin added a comment.Apr 4 2019, 5:19 PM

erm can you run sudo usysconf run -f and reboot?

I can confirm this doesn't work.

kroppt added a subscriber: kroppt.May 11 2019, 8:07 PM

I'm getting this same error after installing Snap apps in terminal. /snap/bin is not in PATH error but the apps seem to install okay.

Snaps are also finicky with whether or not they open. Chromium does not launch anymore. Spotify was failing to open but setting less strict perms in the snapcraft store for the app seemed to fix it.

Beer added a subscriber: Beer.EditedAug 19 2019, 1:12 AM

I get the same issue. Relatively new Solus install (reinstalled last week).

adam@ac-desktop ~ $ sudo snap install code --classic
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.

code f06011ac from Visual Studio Code (vscode✓) installed
adam@ac-desktop ~ $ echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/snap/bin

This is after I got the same error installing the dotnet-sdk snap, after which I relogged my session. These are the first two snaps I've installed since reinstalling Solus

Whats the status of snapd aufter reboot ?

sudo systemctl status snapd ?

Beer added a comment.EditedAug 19 2019, 9:00 PM

@mramish

Fresh boot:

sudo systemctl status snapd
● snapd.service - Snappy daemon
   Loaded: loaded (/usr/lib/systemd/system/snapd.service; disabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-08-18 19:49:57 CDT; 20h ago
 Main PID: 9102 (snapd)
    Tasks: 22 (limit: 4915)
   Memory: 146.6M
   CGroup: /system.slice/snapd.service
           └─9102 /usr/lib64/snapd/snapd

Aug 18 20:22:14 ac-desktop snapd[9102]: udevmon.go:146: udev event error: Unable to parse uevent, err: cannot parse libudev event: invalid env data
Aug 18 20:22:14 ac-desktop snapd[9102]: udevmon.go:146: udev event error: Unable to parse uevent, err: cannot parse libudev event: invalid env data
Aug 18 20:22:14 ac-desktop snapd[9102]: udevmon.go:146: udev event error: Unable to parse uevent, err: cannot parse libudev event: invalid env data
Aug 19 03:19:58 ac-desktop snapd[9102]: storehelpers.go:441: cannot refresh: snap has no updates available: "code", "core", "core18", "dotnet-sdk"
Aug 19 08:46:22 ac-desktop snapd[9102]: udevmon.go:146: udev event error: Unable to parse uevent, err: cannot parse libudev event: invalid env data
Aug 19 08:46:22 ac-desktop snapd[9102]: udevmon.go:146: udev event error: Unable to parse uevent, err: cannot parse libudev event: invalid env data
Aug 19 08:46:22 ac-desktop snapd[9102]: udevmon.go:146: udev event error: Unable to parse uevent, err: cannot parse libudev event: invalid env data
Aug 19 08:46:22 ac-desktop snapd[9102]: udevmon.go:146: udev event error: Unable to parse uevent, err: cannot parse libudev event: invalid env data
Aug 19 11:29:58 ac-desktop snapd[9102]: storehelpers.go:441: cannot refresh: snap has no updates available: "code", "core", "core18", "dotnet-sdk"
Aug 19 13:59:58 ac-desktop snapd[9102]: storehelpers.go:441: cannot refresh: snap has no updates available: "code", "core", "core18", "dotnet-sdk"

Followed by (no reboot/relog) ....

adam@ac-desktop ~ $ sudo snap remove code && sudo snap install code --classic
code removed
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.

code f06011ac from Visual Studio Code (vscode✓) installed
adam@ac-desktop ~ $

Followed by (no reboot/relog) ....

adam@ac-desktop ~ $ sudo systemctl status snapd
● snapd.service - Snappy daemon
   Loaded: loaded (/usr/lib/systemd/system/snapd.service; disabled; vendor preset: enabled)
   Active: active (running) since Sun 2019-08-18 19:49:57 CDT; 20h ago
 Main PID: 9102 (snapd)
    Tasks: 22 (limit: 4915)
   Memory: 234.3M
   CGroup: /system.slice/snapd.service
           └─9102 /usr/lib64/snapd/snapd

Aug 19 15:53:42 ac-desktop snapd[9102]: kernel_os.go:198: cannot get boot settings: cannot determine bootloader
Aug 19 15:53:42 ac-desktop sudo[28882]:     root : TTY=unknown ; PWD=/ ; USER=adam ; COMMAND=/bin/tar --create --sparse --gzip --directory /home/adam/snap/code/ 13 common
Aug 19 15:53:42 ac-desktop sudo[28882]: pam_unix(sudo:session): session opened for user adam by (uid=0)
Aug 19 15:53:42 ac-desktop sudo[28882]: pam_unix(sudo:session): session closed for user adam
Aug 19 15:53:43 ac-desktop snapd[9102]: api.go:1079: Installing snap "code" revision unset
Aug 19 15:53:52 ac-desktop snapd[9102]: api.go:1079: Installing snap "code" revision unset
Aug 19 15:53:54 ac-desktop snapd[9102]: desktop.go:129: cannot use line "Exec=/usr/share/code/code --new-window %F" for desktop file "/var/lib/snapd/desktop/applications/code_code.desktop" (snap code)
Aug 19 15:56:30 ac-desktop snapd[9102]: kernel_os.go:198: cannot get boot settings: cannot determine bootloader
Aug 19 15:56:31 ac-desktop snapd[9102]: api.go:1079: Installing snap "code" revision unset
Aug 19 15:56:34 ac-desktop snapd[9102]: desktop.go:129: cannot use line "Exec=/usr/share/code/code --new-window %F" for desktop file "/var/lib/snapd/desktop/applications/code_code.desktop" (snap code)

lines 1-19/19 (END)

edit: same status as above after relogging session