Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot load such file: lib/whatweb #283

Closed
blshkv opened this issue Oct 5, 2019 · 5 comments
Closed

cannot load such file: lib/whatweb #283

blshkv opened this issue Oct 5, 2019 · 5 comments

Comments

@blshkv
Copy link

blshkv commented Oct 5, 2019

I'm trying to push the latest version 0.5 to Pentoo and facing this problem.
I have installed the tool using the standard "make install" function and got the following structure:

/usr/bin/whatweb
/usr/share/whatweb/*
```
However, it fails to start with the following message:
```
/usr/lib64/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- lib/whatweb (LoadError)
        from /usr/lib64/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/bin/whatweb:37:in `<main>'
```


FYI: the previous version used to have the following loader:
```
## set up load paths - must be before loading lib/ files
# add the directory of the file currently being executed to the load path
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless
    $:.include?(File.dirname(__FILE__)) || $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
$LOAD_PATH << "/usr/share/whatweb/"
```
@sytranvn
Copy link

sytranvn commented Oct 10, 2019

I think symlink should be supported as in previous version too. Because I just link whatweb to my bin folder instead of run make install.
There is a PR for this issue #282

@blshkv
Copy link
Author

blshkv commented Oct 10, 2019

yes, I guess make install should just create a symlink after you patch. That would be the proper fix.

@urbanadventurer
Copy link
Owner

Thanks for the help @blshkv and @sytranvn

@blshkv
Copy link
Author

blshkv commented Mar 24, 2020

something is broken. Please re-open this bug

install -p -D -m 644 whatweb.1 /var/tmp/portage/net-analyzer/whatweb-0.5.1/image/usr/share/man/man1/whatweb.1
gzip -f /var/tmp/portage/net-analyzer/whatweb-0.5.1/image/usr/share/man/man1/whatweb.1
install -d /var/tmp/portage/net-analyzer/whatweb-0.5.1/image/usr/share/whatweb
install -d /var/tmp/portage/net-analyzer/whatweb-0.5.1/image/usr/share/doc/whatweb-0.5.1
# copy whatweb into LIBPATH/NAME/ and create a symbolic link in the BINPATH
install -p -D -m 755 whatweb /var/tmp/portage/net-analyzer/whatweb-0.5.1/image/usr/share/whatweb
ln -s /var/tmp/portage/net-analyzer/whatweb-0.5.1/image/usr/share/whatweb/whatweb /var/tmp/portage/net-analyzer/whatweb-0.5.1/image/usr/bin/whatweb
ln: failed to create symbolic link '/var/tmp/portage/net-analyzer/whatweb-0.5.1/image/usr/bin/whatweb': No such file or directory

@blshkv
Copy link
Author

blshkv commented Mar 24, 2020

ok, found it. You have to make sure that BINPATH exists before linking the binary:
https://github.com/urbanadventurer/WhatWeb/blob/master/Makefile#L30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants