WhatWeb icon indicating copy to clipboard operation
WhatWeb copied to clipboard

whatweb:257:in `require_relative': cannot load such file -- /usr/bin/lib/messages (LoadError)

Open dotnetCarpenter opened this issue 4 months ago • 7 comments

Error message:

/usr/bin/whatweb:257:in `require_relative': cannot load such file -- /usr/bin/lib/messages (LoadError)
	from /usr/bin/whatweb:257:in `<main>'

Steps to reproduce:

$ which ruby
/usr/bin/ruby

$ ruby --version
ruby 3.3.8 (2025-04-09 revision b200bad6cd) [x86_64-linux-gnu]

$ whatweb -a 1 -v https://www.example.com
/usr/bin/whatweb:257:in `require_relative': cannot load such file -- /usr/bin/lib/messages (LoadError)
	from /usr/bin/whatweb:257:in `<main>'


$ whatweb 

.$$$     $.                                   .$$$     $.
$$$$     $$. .$$$  $$$ .$$$$$$.  .$$$$$$$$$$. $$$$     $$. .$$$$$$$. .$$$$$$.
$ $$     $$$ $ $$  $$$ $ $$$$$$. $$$$$ $$$$$$ $ $$     $$$ $ $$   $$ $ $$$$$$.
$ `$     $$$ $ `$  $$$ $ `$  $$$ $$' $ `$ `$$ $ `$     $$$ $ `$      $ `$  $$$'
$. $     $$$ $. $$$$$$ $. $$$$$$ `$  $. $  :' $. $     $$$ $. $$$$   $. $$$$$.
$::$  .  $$$ $::$  $$$ $::$  $$$     $::$     $::$  .  $$$ $::$      $::$  $$$$
$;;$ $$$ $$$ $;;$  $$$ $;;$  $$$     $;;$     $;;$ $$$ $$$ $;;$      $;;$  $$$$
$$$$$$ $$$$$ $$$$  $$$ $$$$  $$$     $$$$     $$$$$$ $$$$$ $$$$$$$$$ $$$$$$$$$'


WhatWeb - Next generation web scanner version 0.6.3.
Developed by Andrew Horton (urbanadventurer) and Brendan Coles (bcoles)
Homepage: https://morningstarsecurity.com/research/whatweb

Apt version:

$ apt show whatweb
Package: whatweb
Version: 0.6.3-1
Priority: optional
Section: ruby
Maintainer: Laszlo Boszormenyi (GCS) <[email protected]>
Installed-Size: 19.7 MB
Depends: ruby, ruby-ipaddress, ruby-addressable
Recommends: ruby-json, ruby-rchardet
Homepage: https://www.morningstarsecurity.com/research/whatweb
Download-Size: 2324 kB
APT-Manual-Installed: yes
APT-Sources: https://http.kali.org/kali kali-rolling/main amd64 Packages
Description: Next generation web scanner
 WhatWeb identifies websites. It recognises web technologies including
 content management systems (CMS), blogging platforms, statistic/analytics
 packages, JavaScript libraries, web servers, and embedded devices.
 .
 WhatWeb has over 900 plugins, each to recognise something different.
 It also identifies version numbers, email addresses, account IDs,
 web framework modules, SQL errors, and more.

Linkback: Kali Linux: https://www.kali.org/tools/whatweb/ https://pkg.kali.org/pkg/whatweb

Debian Linux: https://bugs.debian.org/cgi-bin/pkgreport.cgi?package=whatweb

The #690932 [i| | ] [whatweb] whatweb: bashism in /bin/sh script bug report might be unrelated since it list plugins and I can not verify that I can get whatweb to even get to the phase of loading any plugins.

dotnetCarpenter avatar Oct 28 '25 08:10 dotnetCarpenter

I'm experiencing the same issue here, same exact versions of the dependencies. Only difference being on an arm64 distribution.

c4bestan avatar Nov 10 '25 14:11 c4bestan

Hello. I've the same issue. Try to uninstall Ruby and install earlier version. Doesn't help. OS Kali 2025 - Linux kaliLinux 6.16.8+kali-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.16.8-1kali1 (2025-09-24) x86_64 GNU/Linux The issue appeared after update pkg.

tarasovmaksimmt avatar Nov 10 '25 19:11 tarasovmaksimmt

Running kali linux here. I'm also having this issue. I'm not sure if it worked in the out of box version since I did a full-upgrade as soon as I turned it on.

Floppymnt avatar Nov 14 '25 08:11 Floppymnt

Running kali linux here. I'm also having this issue. I'm not sure if it worked in the out of box version since I did a full-upgrade as soon as I turned it on.

I don't understand what the solution is. I updated Kali today and it still doesn't work, I'm getting the same error too.

Alberto-00 avatar Nov 14 '25 09:11 Alberto-00

Running kali linux here. I'm also having this issue. I'm not sure if it worked in the out of box version since I did a full-upgrade as soon as I turned it on.

I don't understand what the solution is. I updated Kali today and it still doesn't work, I'm getting the same error too.

I found that instead of using "apt-get" just git clone the repo followed by running "make install" to install it this way seemed to fix the issue for me. I'd recommend running "apt-get uninstall whatweb" first.

Floppymnt avatar Nov 18 '25 13:11 Floppymnt

Same problem here..

whatweb <redacted domain>
/usr/bin/whatweb:257:in `require_relative': cannot load such file -- /usr/bin/lib/messages (LoadError)
        from /usr/bin/whatweb:257:in `<main>'

Description: Kali GNU/Linux Rolling Release: 2025.4 dpkg -l|grep whatweb yields version 0.6.3-1

Am0rphous avatar Nov 20 '25 15:11 Am0rphous

The issue is that the referenced library 'messages' is no longer held in the expected place. It is here instead:

/usr/lib/ruby/vendor_ruby/messages.rb

So correct this path on line 257. Fixing this reveals another dependency that was also moved:

/usr/lib/ruby/vendor_ruby/simple_cookie_jar.rb

Fix this path on line 628 and the script will work again.

vorpalmusic avatar Nov 21 '25 08:11 vorpalmusic