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

Error: cannot load such file -- irb #931

Closed dharmab closed 5 years ago

dharmab commented 5 years ago

Please note that we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

What you were trying to do (and why)

I installed Linuxbrew on Arch Linux and tried to install packages with brew install <package>

What happened (include command output)

I got this error:

Command output
[dharmab@n7 ~]$ brew install direnv
Error: cannot load such file -- irb
/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/debrew/irb.rb:1:in `'
/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/debrew.rb:2:in `'
/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/formula_installer.rb:10:in `'
/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/cmd/install.rb:2:in `'
/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/utils.rb:19:in `require?'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/brew.rb:61:in `
'

What you expected to happen

A package to be installed

Step-by-step reproduction instructions (by running brew commands)

brew install <package>

brew config:

HOMEBREW_VERSION: 2.0.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: e32c1515432a938093d5ef1d8c4b4408991873df
Last commit: 30 hours ago
Core tap ORIGIN: https://github.com/Linuxbrew/homebrew-core
Core tap HEAD: 4b962b502dadb8a93e554bb16dbaa19c526bf3a7
Core tap last commit: 6 hours ago
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_CACHE: /home/dharmab/.cache/Homebrew
HOMEBREW_LOGS: /home/dharmab/.cache/Homebrew/Logs
CPU: quad-core 64-bit haswell
Homebrew Ruby: 2.6.1 => /usr/bin/ruby
Clang: 7.0 build 701
Git: 2.20.1 => /bin/git
Curl: 7.64.0 => /usr/bin/curl
Kernel: Linux 4.20.6-arch1-1-ARCH x86_64 GNU/Linux
OS: N/A
Host glibc: 2.28
/usr/bin/gcc: 8.2.1
glibc: N/A
gcc: N/A
xorg: N/A

brew doctor:

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: python is symlinked to python3
This will confuse build scripts and in general lead to subtle breakage.

Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
  /bin/gdlib-config
  /bin/ksba-config
  /bin/ldns-config
  /bin/libotf-config
  /bin/imlib2-config
  /bin/lxdm-config
  /bin/krb5-config
  /bin/giblib-config
  /bin/pcap-config
  /bin/npth-config
  /bin/nspr-config
  /bin/gpgme-config
  /bin/icu-config
  /bin/libgcrypt-config
  /bin/pspell-config
  /bin/sdl2-config
  /bin/croco-0.6-config
  /bin/ijs-config
  /bin/caca-config
  /bin/sdl-config
  /bin/libwmf-config
  /bin/libnet-config
  /bin/onig-config
  /bin/libassuan-config
  /bin/libpng-config
  /bin/libpng16-config
  /bin/ncursesw6-config
  /bin/python-config
  /bin/python3-config
  /bin/python3.7-config
  /bin/python3.7m-config
  /bin/pcre-config
  /bin/cups-config
  /bin/pcre2-config
  /bin/js52-config
  /bin/xslt-config
  /bin/guile-config
  /bin/python2-config
  /bin/python2.7-config
  /bin/bind9-config
  /bin/i686-pc-linux-gnu-pkg-config
  /bin/pkg-config
  /bin/x86_64-pc-linux-gnu-pkg-config
  /bin/ansible-config
  /bin/xml2-config
  /bin/gpg-error-config
  /bin/gpgrt-config
  /bin/nss-config
  /bin/curl-config
  /bin/Magick++-config
  /bin/MagickCore-config
  /bin/MagickWand-config

Note that "fixing" those above issues will break Arch Linux.

sjackman commented 5 years ago

You are missing irb. You have two options to work around this issue.

  1. brew vendor-install ruby
  2. sudo pacman -Syu ruby-irb