zplug can't find ZPLUG_LOADFILE

Created on 16 Jul 2017  ·  6Comments  ·  Source: zplug/zplug

  • Type:

    • [x] Bug

    • [ ] Enhancement

    • [ ] Feature Request

    • [ ] Question


  • zplug --version: 2.4.1
  • zsh --version: zsh 5.0.7 (arm-unknown-linux-gnueabihf)
  • uname -a: Linux somehostname 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux

Type: Bug

Minimal zshrc

source ~/.zplug/init.zsh

zplug 'plugins/git',                      from:oh-my-zsh, ignore:oh-my-zsh.sh

# Install plugins if there are plugins that have not been installed
if ! zplug check; then
    printf "Install new zplug-plugins? [y/N]: "
    if read -q; then
        echo; zplug install
    fi
fi

# Then, source plugins and add commands to $PATH
zplug load

Step to reproduce

  1. Install via $ curl -sL --proto-redir -all,https https://raw.githubusercontent.com/zplug/installer/master/installer.zsh| zsh

  2. Run zplug update:

$ zplug update
[zplug] Start to update 1 plugins in parallel

 ✘  Unknown error         plugins/git

[zplug] Elapsed time: 0.5025 sec.
 ==> Updating finished successfully!

(Side Note: Why does zplug claim that updating was successfull?)

$ zplug env
ZPLUG_ROOT = /home/pi/.zplug
ZPLUG_HOME = /home/pi/.zplug
ZPLUG_THREADS = 16
ZPLUG_PROTOCOL = HTTPS
ZPLUG_FILTER = fzf-tmux:fzf:peco:percol:fzy:zaw
ZPLUG_LOADFILE = /home/pi/.zplug/packages.zsh
ZPLUG_USE_CACHE = true
ZPLUG_ERROR_LOG = /home/pi/.zplug/.error_log
ZPLUG_BIN = /home/pi/.zplug/bin
ZPLUG_CACHE_DIR = /home/pi/.zplug/cache
ZPLUG_REPOS = /home/pi/.zplug/repos
_ZPLUG_VERSION = 2.4.1
_ZPLUG_URL = https://github.com/zplug/zplug
_ZPLUG_OHMYZSH = robbyrussell/oh-my-zsh
_ZPLUG_PREZTO = sorin-ionescu/prezto
_ZPLUG_AWKPATH = /home/pi/.zplug/misc/contrib
_ZPLUG_CONFIG_SUBSHELL = :
$ zplug --log
{"pid":1231,"shlvl":1,"level":"INFO","dir":"/home/pi","message":"ZPLUG_LOADFILE is not found","trace":["__zplug::log::write::info:2","__zplug::io::file::load:3","/home/pi/.zplug/init.zsh:33","/home/pi/.zplug.zsh:1","/home/pi/.zshrc:6","zsh:0"],"date":"2017-07-16T19:23:03+0200"}
{"pid":1231,"shlvl":1,"level":"INFO","dir":"/home/pi","message":"turn monitor on","trace":["__zplug::log::write::info:2","__zplug::job::polling::periodic:9","-zsh:1"],"date":"2017-07-16T19:23:06+0200"}
{"pid":1231,"shlvl":1,"level":"INFO","dir":"/home/pi","message":"turn monitor on","trace":["__zplug::log::write::info:2","__zplug::job::polling::periodic:9","-zsh:5"],"date":"2017-07-16T19:23:48+0200"}
{"pid":1231,"shlvl":1,"level":"INFO","dir":"/home/pi","message":"turn monitor on","trace":["__zplug::log::write::info:2","__zplug::job::polling::periodic:9","-zsh:11"],"date":"2017-07-16T19:26:06+0200"}
  1. So zplug errors because it expects ZPLUG_LOADFILE to link to ~/.zplug/packages.zsh. Shouldn't that file be created during installation of zplug?

Either way, after creating the file,$ touch ~/.zplug/packages.zsh $ zplug update still fails:

$ cat ~/.zplug/log/trace.log
{"pid":1231,"shlvl":1,"level":"INFO","dir":"/home/pi","message":"ZPLUG_LOADFILE is not found","trace":["__zplug::log::write::info:2","__zplug::io::file::load:3","/home/pi/.zplug/init.zsh:33","/home/pi/.zplug.zsh:1","/home/pi/.zshrc:6","zsh:0"],"date":"2017-07-16T19:23:03+0200"}
{"pid":1231,"shlvl":1,"level":"INFO","dir":"/home/pi","message":"turn monitor on","trace":["__zplug::log::write::info:2","__zplug::job::polling::periodic:9","-zsh:1"],"date":"2017-07-16T19:23:06+0200"}
{"pid":1231,"shlvl":1,"level":"INFO","dir":"/home/pi","message":"turn monitor on","trace":["__zplug::log::write::info:2","__zplug::job::polling::periodic:9","-zsh:5"],"date":"2017-07-16T19:23:48+0200"}
{"pid":1231,"shlvl":1,"level":"INFO","dir":"/home/pi","message":"turn monitor on","trace":["__zplug::log::write::info:2","__zplug::job::polling::periodic:9","-zsh:11"],"date":"2017-07-16T19:26:06+0200"}
{"pid":1231,"shlvl":1,"level":"INFO","dir":"/home/pi/.zplug","message":"turn monitor on","trace":["__zplug::log::write::info:2","__zplug::job::polling::periodic:9","-zsh:20"],"date":"2017-07-16T19:35:25+0200"}
{"pid":3646,"shlvl":1,"level":"INFO","dir":"/home/pi","message":"turn monitor on","trace":["__zplug::log::write::info:2","__zplug::job::polling::periodic:9","-zsh:1"],"date":"2017-07-16T19:37:30+0200"}
{"pid":3646,"shlvl":1,"level":"INFO","dir":"/home/pi/.zplug","message":"turn monitor on","trace":["__zplug::log::write::info:2","__zplug::job::polling::periodic:9","-zsh:5"],"date":"2017-07-16T19:38:22+0200"}

Most helpful comment

Not sure why this is closed; I just followed the advice to touch $ZPLUG_LOADFILE and my startup time went from 0.7s => 0.5s and I'm also on GNU awk.

https://github.com/zplug/zplug/issues/368#issuecomment-282566102

❯ time zsh -i -c exit                                                                                                                                           
zsh -i -c exit  0.57s user 0.24s system 115% cpu 0.705 total

~
❯ echo $ZPLUG_LOADFILE                                                                                                                                          
/home/jon/opt/zplug/packages.zsh

~
❯ ll $ZPLUG_LOADFILE                                                                                                                                           
ls: cannot access /home/jon/opt/zplug/packages.zsh: No such file or directory
total 0

❯ touch /home/jon/opt/zplug/packages.zsh

❯ time zsh -i -c exit                                                                                                                                           
zsh -i -c exit  0.39s user 0.24s system 117% cpu 0.533 total

❯ awk -W version                                                                                                                                                2018-12-16 12:43:33
GNU Awk 4.2.1, API: 2.0 (GNU MPFR 4.0.1, GNU MP 6.1.2)
Copyright (C) 1989, 1991-2018 Free Software Foundation.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.

All 6 comments

I'm sorry for the late reply.

Please tell us the result of trying awk -W version.

$ awk -W version
mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan

compiled limits:
max NF             32767
sprintf buffer      1020

This is on a Raspberry Pi running Debian.

@39e I am having the same issue and I am running GNU Awk

I seem to be running into the same issue on GNU Awk as well.

  • zplug --version2.4.1
  • zsh --version5.4.1
  • awk --version4.1.4
  • uname -aLinux hostname 4.12.5-1-zen #1 ZEN SMP PREEMPT Sun Aug 6 23:14:47 UTC 2017 x86_64 GNU/Linux

Not sure why this is closed; I just followed the advice to touch $ZPLUG_LOADFILE and my startup time went from 0.7s => 0.5s and I'm also on GNU awk.

https://github.com/zplug/zplug/issues/368#issuecomment-282566102

❯ time zsh -i -c exit                                                                                                                                           
zsh -i -c exit  0.57s user 0.24s system 115% cpu 0.705 total

~
❯ echo $ZPLUG_LOADFILE                                                                                                                                          
/home/jon/opt/zplug/packages.zsh

~
❯ ll $ZPLUG_LOADFILE                                                                                                                                           
ls: cannot access /home/jon/opt/zplug/packages.zsh: No such file or directory
total 0

❯ touch /home/jon/opt/zplug/packages.zsh

❯ time zsh -i -c exit                                                                                                                                           
zsh -i -c exit  0.39s user 0.24s system 117% cpu 0.533 total

❯ awk -W version                                                                                                                                                2018-12-16 12:43:33
GNU Awk 4.2.1, API: 2.0 (GNU MPFR 4.0.1, GNU MP 6.1.2)
Copyright (C) 1989, 1991-2018 Free Software Foundation.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

eru picture eru  ·  4Comments

grexe picture grexe  ·  3Comments

asymmetric picture asymmetric  ·  11Comments

b4b4r07 picture b4b4r07  ·  7Comments

jottr picture jottr  ·  5Comments