Linuxbrew / brew

:beer::penguin: The Homebrew package manager for Linux
https://linuxbrew.sh
BSD 2-Clause "Simplified" License
2.66k stars 237 forks source link

cannot load such file -- plist #849

Closed jeromecovington closed 6 years ago

jeromecovington commented 6 years ago

Please fill out the issue checklist below and provide all the requested information.

To help us debug your issue please explain:


First of all thanks all for the work so far on this project. If I can get things working properly, I think it'll help me unblock some developer-workflow stuff for me, and I'm looking forward to seeing benefits on getting more up to date versions of some software, as well.

I installed Linuxbrew by following this tutorial, but now whenever I run:

$ brew upgrade
Traceback (most recent call last):
    7: from /home/jcovingt/.linuxbrew/Library/Homebrew/brew.rb:15:in `<main>'
    6: from /home/jcovingt/.linuxbrew/Library/Homebrew/brew.rb:15:in `require_relative'
    5: from /home/jcovingt/.linuxbrew/Library/Homebrew/global.rb:15:in `<top (required)>'
    4: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
    3: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
    2: from /home/jcovingt/.linuxbrew/Library/Homebrew/system_command.rb:3:in `<top (required)>'
    1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- plist (LoadError)

The same error results when running brew doctor and brew config.

As far as I know plists only exist/work on macOS/OSX, so don't know how to install the missing gem on my Ubuntu 18 LTS system. Is there some way that Linuxbrew should be able to pave over this OS difference or am I missing something obvious?

jeromecovington commented 6 years ago

Hm. I think somewhere along the way I missed a cross platform ruby install that I would have gotten by using the documented installer mentioned in this repo. https://github.com/Linuxbrew/install/blob/master/install-ruby#L16

Let me back out of the tutorial that I'm following and try the official Installer. I'll reopen this issue if necessary.

jeromecovington commented 6 years ago

Huh. No I got more or less the same results running the installer.

$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
==> Select the Linuxbrew installation directory
- Enter your password to install to /home/linuxbrew/.linuxbrew (recommended)
- Press Control-D to install to /home/jcovingt/.linuxbrew
- Press Control-C to cancel installation
[sudo] password for jcovingt: 
==> This script will install:
/home/linuxbrew/.linuxbrew/bin/brew
/home/linuxbrew/.linuxbrew/share/doc/homebrew
/home/linuxbrew/.linuxbrew/share/man/man1/brew.1
/home/linuxbrew/.linuxbrew/share/zsh/site-functions/_brew
/home/linuxbrew/.linuxbrew/etc/bash_completion.d/brew
/home/jcovingt/.cache/Homebrew/
/home/linuxbrew/.linuxbrew/Homebrew
==> The following new directories will be created:
/home/linuxbrew/.linuxbrew/Cellar
/home/linuxbrew/.linuxbrew/Homebrew
/home/linuxbrew/.linuxbrew/bin
/home/linuxbrew/.linuxbrew/etc
/home/linuxbrew/.linuxbrew/include
/home/linuxbrew/.linuxbrew/lib
/home/linuxbrew/.linuxbrew/opt
/home/linuxbrew/.linuxbrew/sbin
/home/linuxbrew/.linuxbrew/share
/home/linuxbrew/.linuxbrew/share/zsh
/home/linuxbrew/.linuxbrew/share/zsh/site-functions
/home/linuxbrew/.linuxbrew/var

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /home/linuxbrew/.linuxbrew
==> /usr/bin/sudo /bin/chown jcovingt:jcovingt /home/linuxbrew/.linuxbrew
==> /usr/bin/sudo /bin/mkdir -p /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Homebrew /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var
==> /usr/bin/sudo /bin/chmod g+rwx /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Homebrew /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var
==> /usr/bin/sudo /bin/chmod 755 /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions
==> /usr/bin/sudo /bin/chown jcovingt /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Homebrew /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var
==> /usr/bin/sudo /bin/chgrp jcovingt /home/linuxbrew/.linuxbrew/Cellar /home/linuxbrew/.linuxbrew/Homebrew /home/linuxbrew/.linuxbrew/bin /home/linuxbrew/.linuxbrew/etc /home/linuxbrew/.linuxbrew/include /home/linuxbrew/.linuxbrew/lib /home/linuxbrew/.linuxbrew/opt /home/linuxbrew/.linuxbrew/sbin /home/linuxbrew/.linuxbrew/share /home/linuxbrew/.linuxbrew/share/zsh /home/linuxbrew/.linuxbrew/share/zsh/site-functions /home/linuxbrew/.linuxbrew/var
==> /usr/bin/sudo /bin/mkdir -p /home/jcovingt/.cache/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /home/jcovingt/.cache/Homebrew
==> /usr/bin/sudo /bin/chown jcovingt /home/jcovingt/.cache/Homebrew
==> /usr/bin/sudo /bin/chgrp jcovingt /home/jcovingt/.cache/Homebrew
==> Downloading and installing Linuxbrew...
remote: Counting objects: 120087, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 120087 (delta 1), reused 0 (delta 0), pack-reused 120078
Receiving objects: 100% (120087/120087), 27.05 MiB | 25.65 MiB/s, done.
Resolving deltas: 100% (88094/88094), done.
From https://github.com/Linuxbrew/brew
 * [new branch]          master     -> origin/master
 * [new tag]             1.0.0      -> 1.0.0
 * [new tag]             1.0.1      -> 1.0.1
 * [new tag]             1.0.2      -> 1.0.2
 * [new tag]             1.0.3      -> 1.0.3
 * [new tag]             1.0.4      -> 1.0.4
 * [new tag]             1.0.5      -> 1.0.5
 * [new tag]             1.0.6      -> 1.0.6
 * [new tag]             1.0.7      -> 1.0.7
 * [new tag]             1.0.8      -> 1.0.8
 * [new tag]             1.0.9      -> 1.0.9
 * [new tag]             1.1.0      -> 1.1.0
 * [new tag]             1.1.0.1    -> 1.1.0.1
 * [new tag]             1.1.1      -> 1.1.1
 * [new tag]             1.1.10     -> 1.1.10
 * [new tag]             1.1.11     -> 1.1.11
 * [new tag]             1.1.12     -> 1.1.12
 * [new tag]             1.1.13     -> 1.1.13
 * [new tag]             1.1.2      -> 1.1.2
 * [new tag]             1.1.2.1    -> 1.1.2.1
 * [new tag]             1.1.3      -> 1.1.3
 * [new tag]             1.1.4      -> 1.1.4
 * [new tag]             1.1.5      -> 1.1.5
 * [new tag]             1.1.6      -> 1.1.6
 * [new tag]             1.1.7      -> 1.1.7
 * [new tag]             1.1.8      -> 1.1.8
 * [new tag]             1.1.9      -> 1.1.9
 * [new tag]             1.2.0      -> 1.2.0
 * [new tag]             1.2.1      -> 1.2.1
 * [new tag]             1.2.2      -> 1.2.2
 * [new tag]             1.2.3      -> 1.2.3
 * [new tag]             1.2.4      -> 1.2.4
 * [new tag]             1.2.5      -> 1.2.5
 * [new tag]             1.2.6      -> 1.2.6
 * [new tag]             1.2.7      -> 1.2.7
 * [new tag]             1.2.8      -> 1.2.8
 * [new tag]             1.3.0      -> 1.3.0
 * [new tag]             1.3.1      -> 1.3.1
 * [new tag]             1.3.2      -> 1.3.2
 * [new tag]             1.3.3      -> 1.3.3
 * [new tag]             1.3.4      -> 1.3.4
 * [new tag]             1.3.5      -> 1.3.5
 * [new tag]             1.3.6      -> 1.3.6
 * [new tag]             1.3.7      -> 1.3.7
 * [new tag]             1.3.8      -> 1.3.8
 * [new tag]             1.3.9      -> 1.3.9
 * [new tag]             1.4.0      -> 1.4.0
 * [new tag]             1.4.1      -> 1.4.1
 * [new tag]             1.4.2      -> 1.4.2
 * [new tag]             1.4.3      -> 1.4.3
 * [new tag]             1.5.0      -> 1.5.0
 * [new tag]             1.5.1      -> 1.5.1
 * [new tag]             1.5.10     -> 1.5.10
 * [new tag]             1.5.11     -> 1.5.11
 * [new tag]             1.5.12     -> 1.5.12
 * [new tag]             1.5.13     -> 1.5.13
 * [new tag]             1.5.14     -> 1.5.14
 * [new tag]             1.5.2      -> 1.5.2
 * [new tag]             1.5.3      -> 1.5.3
 * [new tag]             1.5.4      -> 1.5.4
 * [new tag]             1.5.5      -> 1.5.5
 * [new tag]             1.5.6      -> 1.5.6
 * [new tag]             1.5.7      -> 1.5.7
 * [new tag]             1.5.8      -> 1.5.8
 * [new tag]             1.5.9      -> 1.5.9
 * [new tag]             1.6.0      -> 1.6.0
 * [new tag]             1.6.1      -> 1.6.1
 * [new tag]             1.6.10     -> 1.6.10
 * [new tag]             1.6.11     -> 1.6.11
 * [new tag]             1.6.12     -> 1.6.12
 * [new tag]             1.6.13     -> 1.6.13
 * [new tag]             1.6.14     -> 1.6.14
 * [new tag]             1.6.15     -> 1.6.15
 * [new tag]             1.6.16     -> 1.6.16
 * [new tag]             1.6.17     -> 1.6.17
 * [new tag]             1.6.2      -> 1.6.2
 * [new tag]             1.6.3      -> 1.6.3
 * [new tag]             1.6.4      -> 1.6.4
 * [new tag]             1.6.5      -> 1.6.5
 * [new tag]             1.6.6      -> 1.6.6
 * [new tag]             1.6.7      -> 1.6.7
 * [new tag]             1.6.8      -> 1.6.8
 * [new tag]             1.6.9      -> 1.6.9
 * [new tag]             1.7.0      -> 1.7.0
 * [new tag]             1.7.1      -> 1.7.1
 * [new tag]             1.7.2      -> 1.7.2
 * [new tag]             1.7.3      -> 1.7.3
 * [new tag]             1.7.4      -> 1.7.4
 * [new tag]             1.7.5      -> 1.7.5
HEAD is now at 1699a7ec1 cmd/vendor-install: Use HOMEBREW_BOTTLE_DOMAIN (#847)
Traceback (most recent call last):
    7: from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:15:in `<main>'
    6: from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:15:in `require_relative'
    5: from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/global.rb:15:in `<top (required)>'
    4: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
    3: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
    2: from /home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/system_command.rb:3:in `<top (required)>'
    1: from /usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
/usr/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require': cannot load such file -- plist (LoadError)
Failed during: /home/linuxbrew/.linuxbrew/bin/brew update --force
sjackman commented 6 years ago

Thanks for the bug report, Jerome. See https://github.com/Linuxbrew/install/issues/38#issuecomment-423843456 for a workaround. I'm working on a fix.

sjackman commented 6 years ago

Try…

HOMEBREW_FORCE_VENDOR_RUBY=1 sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
jeromecovington commented 6 years ago

Cool I should be able to give that a try soon, thanks! Super interested in how this project highlights the differences/similarities between the two platforms.

al-the-x commented 6 years ago

Ran into this myself because of an automatic upgrade of brew when I updated formulae. Thereafter brew commands would not work, including brew upgrade. I had to cd into /home/linuxbrew/.linuxbrew/Homebrew/ and use git reset --hard manually to get back to a commit that worked. I additionally went through the trouble of uninstalling and reinstalling with the installer flag above... and then reinstalling all my formulae. Much hilarity ensued. Fortunately I record my installed formulae in a brew bundle but still... Several have failed at this point. I'll keep ya posted.

al-the-x commented 6 years ago

After using brew bundle install --global --force repeatedly and removing some formulae that failed to install from my ~/.Brewfile, I was able to get brew back to functional with the command above. I tagged the line from the upstream merge that probably caused the error.

sjackman commented 6 years ago

This issue is resolved by PR https://github.com/Linuxbrew/brew/pull/850, which will be included in the release of Linuxbrew/brew 1.7.6. In the mean time, to fix an existing installation of Linuxbrew, run…

brew vendor-install ruby

or to install Linuxbrew from scratch, run…

HOMEBREW_FORCE_VENDOR_RUBY=1 sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
jeromecovington commented 6 years ago

Thanks @sjackman glad this will be fixed in the release. In the meantime the install with the HOMEBREW_FORCE_VENDOR_RUBY var worked great.

al-the-x commented 6 years ago

I'm not sure if your proposed workaround for a messed up installation will work, @sjackman, as none of the brew commands will work with that upstream patch applied. Looking forward to the next release.

sjackman commented 6 years ago

brew vendor-install ruby may work, because it's a shell script rather than a Ruby script. Give it a shot.